Changes in directory llvm/lib/Transforms/Scalar:
LoopUnswitch.cpp updated: 1.56 -> 1.57 --- Log message: fix a bug in a recent patch --- Diffs of the changes: (+1 -1) LoopUnswitch.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.56 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.57 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.56 Thu Jan 11 22:24:46 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jan 12 18:02:49 2007 @@ -486,7 +486,7 @@ // Insert a conditional branch on LIC to the two preheaders. The original // code is the true version and the new code is the false version. Value *BranchVal = LIC; - if (Val->getType() != Type::Int1Ty) + if (Val->getType() != Type::Int1Ty || !isa<ConstantInt>(Val)) BranchVal = new ICmpInst(ICmpInst::ICMP_EQ, LIC, Val, "tmp", InsertPt); else if (Val != ConstantInt::getTrue()) // We want to enter the new loop when the condition is true. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits