summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-07 17:50:43 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-07 17:50:43 +0000
commitddb03d831be02323e10b17328f715c0c5ffe3e02 (patch)
treed08cef76e968e81d10bd9cb12868a659793d0a7b /lib/CodeGen/PHIElimination.cpp
parent0875c7ccf5aaa2ea39e0a406511875ca634b1b28 (diff)
downloadllvm-ddb03d831be02323e10b17328f715c0c5ffe3e02.tar.gz
llvm-ddb03d831be02323e10b17328f715c0c5ffe3e02.tar.bz2
llvm-ddb03d831be02323e10b17328f715c0c5ffe3e02.tar.xz
Revert 74898. It broke several tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r--lib/CodeGen/PHIElimination.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index 9adf97cde5..c5c76fc794 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/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.