mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -486,12 +486,11 @@ 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>(Val)) {
|
||||
BranchVal = BinaryOperator::createSetEQ(LIC, Val, "tmp", InsertPt);
|
||||
} else if (Val != ConstantBool::getTrue()) {
|
||||
if (!isa<ConstantBool>(Val))
|
||||
BranchVal = new ICmpInst(ICmpInst::ICMP_EQ, LIC, Val, "tmp", InsertPt);
|
||||
else if (Val != ConstantBool::getTrue())
|
||||
// We want to enter the new loop when the condition is true.
|
||||
std::swap(TrueDest, FalseDest);
|
||||
}
|
||||
|
||||
// Insert the new branch.
|
||||
new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt);
|
||||
|
||||
Reference in New Issue
Block a user