Use ReplacedTy instead of recomputing the same value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-03-09 21:19:58 +00:00
parent 0daeed270b
commit bb5b49cb8d

View 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())