forked from OSchip/llvm-project
Dont' merge terminators that are needed to select PHI node values.
llvm-svn: 13312
This commit is contained in:
parent
2e93c4275e
commit
1e94ed606e
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue