From: Chris Lattner Date: Fri, 20 Mar 2009 05:08:24 +0000 (+0000) Subject: Apply the patch requested in PR3846. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8fc2d0ee8dd4e077ee90a1fcc36fd0101c2947a2;p=oota-llvm.git Apply the patch requested in PR3846. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67364 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index ab63f4933ff..322c28bd4dd 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -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);