diff options
| author | Dan Gohman <gohman@apple.com> | 2009-04-16 15:48:38 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-04-16 15:48:38 +0000 |
| commit | a8be04b2db347611febe8cc323cf4ddb168a9d4a (patch) | |
| tree | 915ed32e08ef53cf89debc0c0a2b1329b1969f85 /llvm/lib | |
| parent | 71bccd3e0e5d79a11533bc806ca63b0d737ed1b3 (diff) | |
| download | bcm5719-llvm-a8be04b2db347611febe8cc323cf4ddb168a9d4a.tar.gz bcm5719-llvm-a8be04b2db347611febe8cc323cf4ddb168a9d4a.zip | |
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
since the operand is always a constant.
llvm-svn: 69291
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 74b0d5a606c..7c856062423 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/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, |

