summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-04 00:58:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-04 00:58:39 +0000
commit55869af998bc658702eaa85e3186f09b13913bda (patch)
tree21e25850e45fdf08f3532089f16182e5d5f17c6e /llvm/lib
parent8f0037097fc1558afaaaf91b91c6e2e8ea120ff1 (diff)
downloadbcm5719-llvm-55869af998bc658702eaa85e3186f09b13913bda.tar.gz
bcm5719-llvm-55869af998bc658702eaa85e3186f09b13913bda.zip
Instruction selection optimizations may have moved the def of a function argument out of the entry block. rdar://7937489
llvm-svn: 102993
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index f48fdfc05ca..422cb7aaafc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -227,7 +227,8 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
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);
}
}
OpenPOWER on IntegriCloud