[llvm] CodeGen: Trim each PHI source subregister lane at its own last read (PR #226209)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 01:14:24 PDT 2026
================
@@ -766,13 +795,35 @@ void PHIEliminationImpl::LowerPHINode(MachineBasicBlock &MBB,
"Cannot find kill instruction");
SlotIndex LastUseIndex = LIS->getInstructionIndex(*KillInst);
- SrcLI.removeSegment(LastUseIndex.getRegSlot(),
- LIS->getMBBEndIdx(&opBlock));
- for (auto &SR : SrcLI.subranges()) {
- SR.removeSegment(LastUseIndex.getRegSlot(),
- LIS->getMBBEndIdx(&opBlock));
+ SlotIndex BlockEndIndex = LIS->getMBBEndIdx(&opBlock);
----------------
ruiling wrote:
Is this whole piece of code trying to do the same thing as `shrinkToUses(SrcLI)`?
https://github.com/llvm/llvm-project/pull/226209
More information about the llvm-commits
mailing list