OSDN Git Service

Apply the patch requested in PR3846.
authorChris Lattner <sabre@nondot.org>
Fri, 20 Mar 2009 05:08:24 +0000 (05:08 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 20 Mar 2009 05:08:24 +0000 (05:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67364 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PrologEpilogInserter.cpp

index ab63f49..322c28b 100644 (file)
@@ -574,7 +574,7 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
           break;
         }
 
-      if (DoIncr) ++I;
+      if (DoIncr && I != BB->end()) ++I;
 
       // Update register states.
       if (RS && MI) RS->forward(MI);