Fix CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll and PR1308:
authorChris Lattner <sabre@nondot.org>
Mon, 9 Apr 2007 00:46:10 +0000 (00:46 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 9 Apr 2007 00:46:10 +0000 (00:46 +0000)
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

lib/CodeGen/PrologEpilogInserter.cpp

index b0e7bd8fcbd2a2cb7f164594d18522e35e05b1b6..b76fa3f4eb4b2d6d630da9ed1e6097e4804eb81a 100644 (file)
@@ -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);