Revert 74898. It broke several tests.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 7 Jul 2009 17:50:43 +0000 (17:50 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 7 Jul 2009 17:50:43 +0000 (17:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PHIElimination.cpp

index 9adf97cde5c4867ecabbbe444053263beb672a83..c5c76fc79467d99fd1fb63b89cc9bf08df70e402 100644 (file)
@@ -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.