[MachineSinking] is this a profitable sinking?

Hi All,

For below pattern:

InstA
Loop1:
bbM:
InstB(has only one operand, and it is InstA)

bbN:
InstC(Only user of InstB)

Suppose bbM dominates bbN, bbN post dominates bbM and bbM & bbN are both inside Loop1.

Is it profitable to sink InstB from bbM to bbN? Current isProfitableToSinkTo will return false.

Sinking InstB to bbN can decrease the live interval for InstB but will not impact the register pressure about InstA because InstA must be alive no matter inside bbM or bbN due to the Loop1?

So this sinking should be profitable?

Thanks.

BRS//
Chen Zheng
Power Compiler Backend Developer