Dont' merge terminators that are needed to select PHI node values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-05-02 01:00:44 +00:00
parent e67fa05036
commit a1f79fb08b

View File

@ -812,7 +812,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI!=E; ++PI)
if (BranchInst *PBI = dyn_cast<BranchInst>((*PI)->getTerminator()))
if (PBI->isConditional()) {
if (PBI->isConditional() && SafeToMergeTerminators(BI, PBI)) {
if (PBI->getSuccessor(0) == FalseDest ||
PBI->getSuccessor(1) == TrueDest) {
// Invert the predecessors condition test (xor it with true),