[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jun 5 15:14:02 PDT 2003


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.88 -> 1.89

---
Log message:

Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll


---
Diffs of the changes:

Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.88 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.89
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.88	Wed Jun  4 00:10:11 2003
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu Jun  5 15:12:51 2003
@@ -1072,7 +1072,7 @@
 
 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);





More information about the llvm-commits mailing list