[PATCH] D51582: [IndVars] Turn isValidRewrite into an assertion
Andrew Trick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 09:52:44 PDT 2018
atrick added a comment.
@sanjoy may have some insight as to why SCEV is now safe. If we know this why can't happen, you can completely remove `isValidRewrite` and don't need to assert.
If you want to keep the logic under an assert, then you could add a more understandable comment:
"Avoid converting `gep Base, (&p[n] - &p[0])` into `gep &p[n], Base - &p[0]`"
https://reviews.llvm.org/D51582
More information about the llvm-commits
mailing list