diff options
author | Chris Lattner <sabre@nondot.org> | 2004-05-02 01:00:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-05-02 01:00:44 +0000 |
commit | a1f79fb08b92801d4ab3cb32fe0bd9d12dfb3954 (patch) | |
tree | 6df5f7875765d437d0e83a9848bc87b602ac34bb /lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | e67fa05036f634a4ec1e0893033c89250eb58954 (diff) |
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
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index dedaa6a657..a1b917ff3e 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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), |