Predicated instructions might not endup being executed. If that happens
they don't really kill the registers they right, so we can't DCE
instructions that are overwritten by potentially predicated
instructions. Fixing MachineDCE to reflect that.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Typo in commit message: "registers they right,".
Otherwise looks reasonable for me, but need someone from Hexagon BE to review it.
Comment Actions
This isn't completely correct. Predicated instructions should have implicit use of the register that they are modifying (unless it's undefined). The cmoveit doesn't have it. How did you get this MIR?
Comment Actions
s/kill the registers they right/kill the registers they write/
so we can't DCE instructions that are overwritten by potentially predicated instructions
nit: re-phrase?
Comment Actions
I'm abandoning this for now based on the fact that I have another patch that ports DeadMachineInstrs to LivePhysRegs. LivePhysRegs though doesn't seem to care about predicates as well ... Probably the fix might need to go there