diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-02-15 19:05:52 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-02-15 19:05:52 +0000 |
| commit | 65152d80ec24c1fe0fb210c3a696e33000c5094d (patch) | |
| tree | b25180341411e0062b5293f4f186ad2eb1349aa1 | |
| parent | 1fcabe2016cc68363bcc02bb6d1a393024c9d7f6 (diff) | |
| download | bcm5719-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.cpp | 2 |
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. |

