llvm-project
59998767 - [CodeGen] Fix register coalescing early-clobber defs into reserved physregs (#233450)

Commit
30 days ago
[CodeGen] Fix register coalescing early-clobber defs into reserved physregs (#233450) Problem arises due to `joinReservedPhysRegs` creating a new dead def `getRegSlot()` without checking if the vreg definition operand was an early-clobber. After adding the `isEarlyClobber` check, `getNextNonNullIndex` preserves the early-clobber index slot kind, so every step of the loop visit the next instruction at its early-clobber slot. With that the loop get past the COPY instruction and falsely rejected the join. So to fix this a `MachineInstruction` iterator is used, rather than checking per slot. Fixes : https://github.com/llvm/llvm-project/issues/229778
Parents
Loading