diff options
author | Eli Friedman <efriedma@quicinc.com> | 2021-07-11 17:00:14 -0700 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2021-07-11 17:04:50 -0700 |
commit | 6144085c29b31e8e43122920a5bfba3d7b77e7ae (patch) | |
tree | 609a8c41f9472134d749c89d8f92773e59345db0 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | 11a0d236503b9ed53a3b216181344a55a0212f95 (diff) | |
download | llvm-6144085c29b31e8e43122920a5bfba3d7b77e7ae.zip llvm-6144085c29b31e8e43122920a5bfba3d7b77e7ae.tar.gz llvm-6144085c29b31e8e43122920a5bfba3d7b77e7ae.tar.bz2 |
[IndVars] Don't widen pointers in WidenIV::getWideRecurrence
It's not a reasonable transform, and calling getSignExtendExpr() on a
pointer hits an assertion.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp index ff60667..bd30be0 100644 --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -1359,7 +1359,7 @@ WidenIV::getExtendedOperandRecurrence(WidenIV::NarrowIVDefUse DU) { /// so, return the extended recurrence and the kind of extension used. Otherwise /// return {nullptr, Unknown}. WidenIV::WidenedRecTy WidenIV::getWideRecurrence(WidenIV::NarrowIVDefUse DU) { - if (!SE->isSCEVable(DU.NarrowUse->getType())) + if (!DU.NarrowUse->getType()->isIntegerTy()) return {nullptr, Unknown}; const SCEV *NarrowExpr = SE->getSCEV(DU.NarrowUse); |