aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-03-09 21:22:12 +0000
committerDan Gohman <gohman@apple.com>2009-03-09 21:22:12 +0000
commit3cfe6a4bc2437a7286844ae9e1c0d3a83d6e8a23 (patch)
tree39c0d6cec82bb16610d752d52af669085d5f5fb3 /lib/Transforms/Scalar/LoopStrengthReduce.cpp
parentbb5b49cb8d1415685d194a7302ec6318f907160b (diff)
Fix a few more places where induction variable types were used
where memory access types are needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index acd253185f..859da1aaca 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1834,7 +1834,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
if (TLI && HaveCommonExprs && AllUsesAreAddresses) {
SCEVHandle NewCommon = CommonExprs;
SCEVHandle Imm = SE->getIntegerSCEV(0, ReplacedTy);
- MoveImmediateValues(TLI, ReplacedTy, NewCommon, Imm, true, L, SE);
+ MoveImmediateValues(TLI, Type::VoidTy, NewCommon, Imm, true, L, SE);
if (!Imm->isZero()) {
bool DoSink = true;
@@ -1933,7 +1933,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
// this by forcing a BitCast (noop cast) to be inserted into the preheader
// in this case.
if (Constant *C = dyn_cast<Constant>(BaseV)) {
- if (!C->isNullValue() && !fitsInAddressMode(Base, ReplacedTy,
+ if (!C->isNullValue() && !fitsInAddressMode(Base, getAccessType(Inst),
TLI, false)) {
// We want this constant emitted into the preheader! This is just
// using cast as a copy so BitCast (no-op cast) is appropriate