diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 733f37c2074..3df0ab35942 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1868,14 +1868,14 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,          // it here.          if (!ReuseIV.Base->isZero()) {            SCEVHandle typedBase = ReuseIV.Base; -          if (RewriteExpr->getType()->getPrimitiveSizeInBits() != -              ReuseIV.Base->getType()->getPrimitiveSizeInBits()) { +          if (TD->getTypeSizeInBits(RewriteExpr->getType()) != +              TD->getTypeSizeInBits(ReuseIV.Base->getType())) {              // It's possible the original IV is a larger type than the new IV,              // in which case we have to truncate the Base.  We checked in              // RequiresTypeConversion that this is valid. -            assert (RewriteExpr->getType()->getPrimitiveSizeInBits() < -                    ReuseIV.Base->getType()->getPrimitiveSizeInBits() && -                    "Unexpected lengthening conversion!"); +            assert(TD->getTypeSizeInBits(RewriteExpr->getType()) < +                   TD->getTypeSizeInBits(ReuseIV.Base->getType()) && +                   "Unexpected lengthening conversion!");              typedBase = SE->getTruncateExpr(ReuseIV.Base,                                               RewriteExpr->getType());            }  | 

