diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-07-07 17:50:43 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-07-07 17:50:43 +0000 |
commit | 0878f15fa1852792cf953399999974ebc4842872 (patch) | |
tree | 19f5045458701e47972e02b31ef0c628aa2a0b60 | |
parent | 4efb280fb0745cd3ade650562b7bc9b2b3e1269b (diff) | |
download | bcm5719-llvm-0878f15fa1852792cf953399999974ebc4842872.tar.gz bcm5719-llvm-0878f15fa1852792cf953399999974ebc4842872.zip |
Revert 74898. It broke several tests.
llvm-svn: 74925
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 9adf97cde5c..c5c76fc7946 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -169,15 +169,9 @@ MachineBasicBlock::iterator PNE::FindCopyInsertPoint(MachineBasicBlock &MBB, return MBB.begin(); // If this basic block does not contain an invoke, then control flow always - // reaches the end of it, so place the copy there. - // If the terminator is a branch depending upon the side effects of a - // previous cmp; a copy can not be inserted here if the copy insn also - // side effects. We don't have access to the attributes of copy insn here; - // so just play safe by finding a safe locations for branch terminators. - // - // The logic below works in this case too, but is more expensive. - const TerminatorInst *TermInst = MBB.getBasicBlock()->getTerminator(); - if (!(isa<InvokeInst>(TermInst) || isa<BranchInst>(TermInst))) + // reaches the end of it, so place the copy there. The logic below works in + // this case too, but is more expensive. + if (!isa<InvokeInst>(MBB.getBasicBlock()->getTerminator())) return MBB.getFirstTerminator(); // Discover any definition/uses in this basic block. |