[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
This commit is contained in:
Max Kazantsev 2017-08-01 06:49:29 +00:00
parent 3c6a820ce3
commit e4c220e8f2
1 changed files with 1 additions and 0 deletions

View File

@ -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());