HomePhabricator

[IndVars] Turn isValidRewrite into an assertion

Description

[IndVars] Turn isValidRewrite into an assertion

Function rewriteLoopExitValues contains a check on isValidRewrite which
is needed to make sure that SCEV does not convert the pattern
gep Base, (&p[n] - &p[0]) into gep &p[n], Base - &p[0]. This problem
has been fixed in SCEV long ago, so this check is just obsolete.

This patch converts it into an assertion to make sure that the SCEV will
not mess up this case in the future.

Differential Revision: https://reviews.llvm.org/D51582
Reviewed By: atrick

Details

Committed
mkazantsevSep 5 2018, 10:21 PM
Reviewer
atrick
Differential Revision
D51582: [IndVars] Turn isValidRewrite into an assertion
Parents
rL341515: Revert rL341509 to fix massive failures on buildbots
Branches
Unknown
Tags
Unknown