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 | a57b9e834f3862c8901d853dc1946e8defac2ad9 (patch) | |
tree | d08cef76e968e81d10bd9cb12868a659793d0a7b /lib/CodeGen | |
parent | fce334de768fd40f833881e5e4062f3a720631ba (diff) | |
download | external_llvm-a57b9e834f3862c8901d853dc1946e8defac2ad9.zip external_llvm-a57b9e834f3862c8901d853dc1946e8defac2ad9.tar.gz external_llvm-a57b9e834f3862c8901d853dc1946e8defac2ad9.tar.bz2 |
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')
-rw-r--r-- | lib/CodeGen/PHIElimination.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 9adf97c..c5c76fc 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. |