summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-09 00:46:10 +0000
committerChris Lattner <sabre@nondot.org>2007-04-09 00:46:10 +0000
commitd2eae62e93fc6e398263a952609b6ea60a204802 (patch)
tree9bdb93dbd971d24eea7feb5e86c431c42032c5b4 /lib/CodeGen/PrologEpilogInserter.cpp
parent7c058276b8238525082327622190ad18c1d127fe (diff)
downloadllvm-d2eae62e93fc6e398263a952609b6ea60a204802.tar.gz
llvm-d2eae62e93fc6e398263a952609b6ea60a204802.tar.bz2
llvm-d2eae62e93fc6e398263a952609b6ea60a204802.tar.xz
Fix CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll and PR1308:
some instructions can have multiple frame indices in them. If this happens, rewrite all of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index b0e7bd8fcb..b76fa3f4eb 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -504,7 +504,11 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
// If this instruction has a FrameIndex operand, we need to use that
// target machine register info object to eliminate it.
MRI.eliminateFrameIndex(I, RS);
- break;
+
+ // Revisit the instruction in full. Some instructions (e.g. inline
+ // asm instructions) can have multiple frame indices.
+ e = I->getNumOperands();
+ i = -1U;
}
// Update register states.
if (RS) RS->forward(I);