summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0df53574361d9e43c4f5e31c64f457b7f0a4c9a6 (patch)
treea3afd613bd9fad9d78e1d79f9387a0daf09aa90d /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parente5056155312d1856015c53a2ffd582e0c772d058 (diff)
downloadbcm5719-llvm-0df53574361d9e43c4f5e31c64f457b7f0a4c9a6.tar.gz
bcm5719-llvm-0df53574361d9e43c4f5e31c64f457b7f0a4c9a6.zip
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. llvm-svn: 35785
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index b0e7bd8fcbd..b76fa3f4eb4 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud