Fixed an iteration condition in PreAllocSplitting. This should fix some miscompilatio...
authorLang Hames <lhames@gmail.com>
Thu, 12 Nov 2009 01:24:08 +0000 (01:24 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 12 Nov 2009 01:24:08 +0000 (01:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86919 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PreAllocSplitting.cpp

index e23024c085a3d6172a9d40f9a044f6db085bc3eb..f2168b625e0a6c9badc42163a21d3ffecf7695be 100644 (file)
@@ -1400,7 +1400,7 @@ bool PreAllocSplitting::removeDeadSpills(SmallPtrSet<LiveInterval*, 8>& split) {
       // Otherwise, this is a load-store case, so DCE them.
       for (SmallPtrSet<MachineInstr*, 4>::iterator UI = 
            VNUseCount[CurrVN].begin(), UE = VNUseCount[CurrVN].end();
-           UI != UI; ++UI) {
+           UI != UE; ++UI) {
         LIs->RemoveMachineInstrFromMaps(*UI);
         (*UI)->eraseFromParent();
       }