[llvm-commits] [llvm] r102993 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Evan Cheng evan.cheng at apple.com
Mon May 3 17:58:39 PDT 2010


Author: evancheng
Date: Mon May  3 19:58:39 2010
New Revision: 102993

URL: http://llvm.org/viewvc/llvm-project?rev=102993&view=rev
Log:
Instruction selection optimizations may have moved the def of a function argument out of the entry block. rdar://7937489

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=102993&r1=102992&r2=102993&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon May  3 19:58:39 2010
@@ -227,7 +227,8 @@
     else {
       MachineInstr *Def = RegInfo->getVRegDef(Reg);
       MachineBasicBlock::iterator InsertPos = Def;
-      EntryMBB->insert(llvm::next(InsertPos), MI);
+      // FIXME: VR def may not be in entry block.
+      Def->getParent()->insert(llvm::next(InsertPos), MI);
     }
   }
 





More information about the llvm-commits mailing list