summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2017-08-01 06:49:29 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2017-08-01 06:49:29 +0000
commite4c220e8f21cc62c8179e2a9dff12436935e62f4 (patch)
treea1258cda342bc871611c184ec5ae0147db63f04d
parent3c6a820ce3393150e4a60a816c8f7c59f3efb61d (diff)
downloadbcm5719-llvm-e4c220e8f21cc62c8179e2a9dff12436935e62f4.tar.gz
bcm5719-llvm-e4c220e8f21cc62c8179e2a9dff12436935e62f4.zip
[IRCE][NFC] Add another assert that AddRecExpr's step is not zero
One more assertion of this kind. It is a preparation step for generalizing to the case of stride not equal to +1/-1. llvm-svn: 309663
-rw-r--r--llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index 0c6a9f20fdd..fe502bf5fd8 100644
--- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -1500,6 +1500,7 @@ InductiveRangeCheck::computeSafeIterationSpace(
const SCEVConstant *B = dyn_cast<SCEVConstant>(IndVar->getStepRecurrence(SE));
if (!B)
return None;
+ assert(!B->isZero() && "Recurrence with zero step?");
const SCEV *C = getOffset();
const SCEVConstant *D = dyn_cast<SCEVConstant>(getScale());
OpenPOWER on IntegriCloud