projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e616bf3
)
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
author
Dan Gohman
<gohman@apple.com>
Thu, 16 Apr 2009 15:48:38 +0000
(15:48 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 16 Apr 2009 15:48:38 +0000
(15:48 +0000)
since the operand is always a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69291
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 74b0d5a606c7b077e8aff6e6ada32673d30d69b1..7c85606242302cbb5caf8b835e85d21721e6466f 100644
(file)
--- a/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@
-2118,9
+2118,8
@@
ICmpInst *LoopStrengthReduce::ChangeCompareStride(Loop *L, ICmpInst *Cond,
if (!isa<PointerType>(NewCmpTy))
NewCmpRHS = ConstantInt::get(NewCmpTy, NewCmpVal);
else {
- NewCmpRHS = ConstantInt::get(UIntPtrTy, NewCmpVal);
- NewCmpRHS = SCEVExpander::InsertCastOfTo(Instruction::IntToPtr,
- NewCmpRHS, NewCmpTy);
+ ConstantInt *CI = ConstantInt::get(UIntPtrTy, NewCmpVal);
+ NewCmpRHS = ConstantExpr::getIntToPtr(CI, NewCmpTy);
}
NewOffset = TyBits == NewTyBits
? SE->getMulExpr(CondUse->Offset,