Use ReplacedTy instead of recomputing the same value.
authorDan Gohman <gohman@apple.com>
Mon, 9 Mar 2009 21:19:58 +0000 (21:19 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 9 Mar 2009 21:19:58 +0000 (21:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66469 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopStrengthReduce.cpp

index f3312151c489bbbe989644e653c6ed5e04deff00..acd253185ffded24c5bc818967664c1bdebaa1c0 100644 (file)
@@ -1903,7 +1903,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
     // the immediate field, if any.
     RewriteFactor = CheckForIVReuse(HaveCommonExprs, AllUsesAreAddresses,
                                     AllUsesAreOutsideLoop,
-                                    Stride, ReuseIV, CommonExprs->getType(),
+                                    Stride, ReuseIV, ReplacedTy,
                                     UsersToProcess);
     if (isa<SCEVConstant>(RewriteFactor) &&
         cast<SCEVConstant>(RewriteFactor)->isZero())