diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-05 20:12:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-05 20:12:51 +0000 |
commit | 9b5fd22bd9b3faaa8a445348b50bd3133b27bf94 (patch) | |
tree | 51038670f221876797f863371f7a39b3c54ced61 /lib | |
parent | d8c1d7619c3e222e65ca349756906a87393dd96d (diff) | |
download | external_llvm-9b5fd22bd9b3faaa8a445348b50bd3133b27bf94.zip external_llvm-9b5fd22bd9b3faaa8a445348b50bd3133b27bf94.tar.gz external_llvm-9b5fd22bd9b3faaa8a445348b50bd3133b27bf94.tar.bz2 |
Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index cfeada3..5d7881d 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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); |