summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-15 19:05:52 +0000
committerChris Lattner <sabre@nondot.org>2006-02-15 19:05:52 +0000
commit65152d80ec24c1fe0fb210c3a696e33000c5094d (patch)
treeb25180341411e0062b5293f4f186ad2eb1349aa1
parent1fcabe2016cc68363bcc02bb6d1a393024c9d7f6 (diff)
downloadbcm5719-llvm-65152d80ec24c1fe0fb210c3a696e33000c5094d.tar.gz
bcm5719-llvm-65152d80ec24c1fe0fb210c3a696e33000c5094d.zip
Checking the wrong value. This caused us to emit silly code like
Y = seteq bool X, true instead of just using X :) llvm-svn: 26215
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnswitch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index 3686e49dcdd..a4da2501f9f 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -442,7 +442,7 @@ static void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val,
// 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.
OpenPOWER on IntegriCloud