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
This commit is contained in:
Chris Lattner
2005-08-29 00:10:46 +00:00
parent b9efd14568
commit dfd58709cc

View File

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