[llvm] r265076 - Follow-up to r265036: I got these iterators mixed up

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 16:55:16 PDT 2016


Author: hans
Date: Thu Mar 31 18:55:16 2016
New Revision: 265076

URL: http://llvm.org/viewvc/llvm-project?rev=265076&view=rev
Log:
Follow-up to r265036: I got these iterators mixed up

Modified:
    llvm/trunk/lib/Target/X86/X86FrameLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=265076&r1=265075&r2=265076&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Thu Mar 31 18:55:16 2016
@@ -2573,8 +2573,8 @@ eliminateCallFramePseudoInstr(MachineFun
     // be spill code inserted between the CALL and ADJCALLSTACKUP instructions.
     MachineBasicBlock::iterator CI = I;
     MachineBasicBlock::iterator B = MBB.begin();
-    while (CI != B && !std::prev(I)->isCall())
-      --I;
+    while (CI != B && !std::prev(CI)->isCall())
+      --CI;
     BuildStackAdjustment(MBB, CI, DL, -InternalAmt, /*InEpilogue=*/false);
   }
 




More information about the llvm-commits mailing list