I am not quite sure, but it seems that the intent in this profitability check may be to avoid sinking phys-reg uses as they would prolong live ranges.
It seems reasonable to me to sink an instruction regardless if it has a dead def of a physreg or not. Physreg defs are checked in other places and sinking is only done with dead defs of regs that are not live into the target MBB.
It may be that this has more than a negligble impact on code generation, so perhaps this was avoided purposefully. It seems to change quite a lot of files on SPEC/SystemZ, at least. On the other hand, it seems that dead defs are in fact allowed generally. Please fill me in if I am missing something here.
This came up when I was experimenting with a pseudo that has the same operands as the target instruction, except it pretends to clobber CC. At least in this case I don't see why the sinking of that instruction should be any different than without that fake dead CC def.
Should probably add brackets around the multiline-if.