From: Chris Lattner Date: Mon, 29 Aug 2005 00:10:46 +0000 (+0000) Subject: Fix a bug in my previous patch that was using the wrong iterator. This fixes X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dfd58709cc78e841ef4a50ba75d940473031617e;p=oota-llvm.git Fix a bug in my previous patch that was using the wrong iterator. This fixes Olden/bisort among others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23124 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index c855eb2a0f8..52026e2bc7e 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -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;