mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
Checking the wrong value. This caused us to emit silly code like
Y = seteq bool X, true instead of just using X :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26215 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
19fd628e5c
commit
3fdde110eb
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user