diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-05-04 00:58:39 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-05-04 00:58:39 +0000 |
| commit | 927ac56aa25df500c7dfed7f5f5527d621db7928 (patch) | |
| tree | 7b5e6959f18ef9bc0c4772475743530bcc5e002b /lib/CodeGen | |
| parent | e397e2c041ddf2dc8565ca4357a3bf93cbe29f86 (diff) | |
| download | external_llvm-927ac56aa25df500c7dfed7f5f5527d621db7928.zip external_llvm-927ac56aa25df500c7dfed7f5f5527d621db7928.tar.gz external_llvm-927ac56aa25df500c7dfed7f5f5527d621db7928.tar.bz2 | |
Instruction selection optimizations may have moved the def of a function argument out of the entry block. rdar://7937489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f48fdfc..422cb7a 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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); } } |
