summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-02 01:00:44 +0000
committerChris Lattner <sabre@nondot.org>2004-05-02 01:00:44 +0000
commit1e94ed606ef5e3253fde50eaf0f39a26530b5c16 (patch)
treea31e846de2e75fb118945b005e5dffb2e7d11a67 /llvm/lib/Transforms
parent2e93c4275ef42f4e51a5eba11de38a1b6633520b (diff)
downloadbcm5719-llvm-1e94ed606ef5e3253fde50eaf0f39a26530b5c16.tar.gz
bcm5719-llvm-1e94ed606ef5e3253fde50eaf0f39a26530b5c16.zip
Dont' merge terminators that are needed to select PHI node values.
llvm-svn: 13312
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index dedaa6a657c..a1b917ff3e9 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/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),
OpenPOWER on IntegriCloud