Skip through instructions rather than operands when looking for last use slot.
authorLang Hames <lhames@gmail.com>
Sun, 19 Feb 2012 04:38:25 +0000 (04:38 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 19 Feb 2012 04:38:25 +0000 (04:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150912 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalAnalysis.cpp

index e0a9a74d411a5630aa3639fe47f87a33c2c410af..6c5dd0e611907072bebef7a563ea90033019ef23 100644 (file)
@@ -1181,7 +1181,7 @@ private:
     for (MachineRegisterInfo::use_nodbg_iterator
            UI = MRI.use_nodbg_begin(Reg),
            UE = MRI.use_nodbg_end();
-         UI != UE; ++UI) {
+         UI != UE; UI.skipInstruction()) {
       const MachineInstr* MI = &*UI;
       SlotIndex InstSlot = LIS.getSlotIndexes()->getInstructionIndex(MI);
       if (InstSlot > LastUse && InstSlot < OldIdx)