[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 15 11:06:03 PST 2006
Changes in directory llvm/lib/Transforms/Scalar:
LoopUnswitch.cpp updated: 1.20 -> 1.21
---
Log message:
Checking the wrong value. This caused us to emit silly code like
Y = seteq bool X, true
instead of just using X :)
---
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.20 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.21
--- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.20 Tue Feb 14 19:44:42 2006
+++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Feb 15 13:05:52 2006
@@ -442,7 +442,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 (!isa<ConstantBool>(BranchVal)) {
+ if (!isa<ConstantBool>(Val)) {
BranchVal = BinaryOperator::createSetEQ(LIC, Val, "tmp", InsertPt);
} else if (Val != ConstantBool::True) {
// We want to enter the new loop when the condition is true.
More information about the llvm-commits
mailing list