summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-23 06:05:41 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-23 06:05:41 +0000
commite4d87aa2de6e52952dca73716386db09aad5a8fd (patch)
treece8c6e6ddc845de3585020c856118892f4206593 /lib/Transforms/Scalar/IndVarSimplify.cpp
parentadd2bd7f5941537a97a41e037ae2277fbeed0b4f (diff)
downloadexternal_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.zip
external_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.tar.gz
external_llvm-e4d87aa2de6e52952dca73716386db09aad5a8fd.tar.bz2
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
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 91759dc..fac17d1 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -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;