Fix a bug in my previous patch that was using the wrong iterator. This fixes
authorChris Lattner <sabre@nondot.org>
Mon, 29 Aug 2005 00:10:46 +0000 (00:10 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 29 Aug 2005 00:10:46 +0000 (00:10 +0000)
Olden/bisort among others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23124 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PrologEpilogInserter.cpp

index c855eb2a0f83fbef591e790f5d0f8be4a503f297..52026e2bc7e96d0c86ceae6eb636f4c237114338 100644 (file)
@@ -217,7 +217,7 @@ void PEI::saveCallerSavedRegisters(MachineFunction &Fn) {
       while (I2 != MBB->begin() && TII.isTerminatorInstr((--I2)->getOpcode()))
         I = I2;
 
-      bool AtStart = I2 == MBB->begin();
+      bool AtStart = I == MBB->begin();
       MachineBasicBlock::iterator BeforeI = I;
       if (!AtStart)
         --BeforeI;