mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +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:
@@ -271,14 +271,14 @@ Instruction *IndVarSimplify::LinearFunctionTestReplace(Loop *L,
|
||||
Value *ExitCnt = RW.expandCodeFor(TripCount, Preheader->getTerminator(),
|
||||
IndVar->getType());
|
||||
|
||||
// Insert a new setne or seteq instruction before the branch.
|
||||
Instruction::BinaryOps Opcode;
|
||||
// Insert a new icmp_ne or icmp_eq instruction before the branch.
|
||||
ICmpInst::Predicate Opcode;
|
||||
if (L->contains(BI->getSuccessor(0)))
|
||||
Opcode = Instruction::SetNE;
|
||||
Opcode = ICmpInst::ICMP_NE;
|
||||
else
|
||||
Opcode = Instruction::SetEQ;
|
||||
Opcode = ICmpInst::ICMP_EQ;
|
||||
|
||||
Value *Cond = new SetCondInst(Opcode, IndVar, ExitCnt, "exitcond", BI);
|
||||
Value *Cond = new ICmpInst(Opcode, IndVar, ExitCnt, "exitcond", BI);
|
||||
BI->setCondition(Cond);
|
||||
++NumLFTR;
|
||||
Changed = true;
|
||||
|
||||
Reference in New Issue
Block a user