summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-05 20:12:51 +0000
committerChris Lattner <sabre@nondot.org>2003-06-05 20:12:51 +0000
commit45789aca97131901542bc0d1b44e77f8262997ce (patch)
treea1f4912b927bb4baa616a4a5674db7b2bbf95877
parente295306e20545ef1ed622b83ae7e36c9812084d9 (diff)
downloadbcm5719-llvm-45789aca97131901542bc0d1b44e77f8262997ce.tar.gz
bcm5719-llvm-45789aca97131901542bc0d1b44e77f8262997ce.zip
Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll
llvm-svn: 6630
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index cfeada349bd..5d7881d68d2 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1072,7 +1072,7 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) {
Instruction *InstCombiner::visitBranchInst(BranchInst &BI) {
// Change br (not X), label True, label False to: br X, label False, True
- if (BI.isConditional())
+ if (BI.isConditional() && !isa<Constant>(BI.getCondition()))
if (Value *V = dyn_castNotVal(BI.getCondition())) {
BasicBlock *TrueDest = BI.getSuccessor(0);
BasicBlock *FalseDest = BI.getSuccessor(1);
OpenPOWER on IntegriCloud