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:
Reid Spencer
2006-12-23 06:05:41 +00:00
parent add2bd7f59
commit e4d87aa2de
87 changed files with 8093 additions and 6620 deletions
+5 -5
View File
@@ -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;