Don't shrink VOP3 instructions if there are any uses of a carry-out
operand, because the shrunken form of the instruction would write the
carry-out to vcc instead of to a virtual register.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM
You might want to wait for Valery or Stas to comment too.
Only minor suggestion - maybe put in a TODO (or equiv) that we could handle this scenario as well (even with the shrinking. (I think).
Comment Actions
It's a correctness problem because when we shrink an instruction like %4:vgpr_32, %5:sreg_64_xexec = V_ADD_CO_U32_e64 %3, %1, 0, implicit $exec the def of %5 turns into an implicit def of vcc, but we don't touch the uses of %5, so they become uses with no def which fails MIR verification.