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

llvm-svn: 13312
This commit is contained in:
Chris Lattner 2004-05-02 01:00:44 +00:00
parent 2e93c4275e
commit 1e94ed606e
1 changed files with 1 additions and 1 deletions

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),