[PATCH] D42417: [SCEV] Fix isLoopEntryGuardedByCond
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 00:07:24 PST 2018
skatkov added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:9066
+ // Both LHS and RHS must be available at loop entry.
+ if (!isAvailableAtLoopEntry(LHS, L) || !isAvailableAtLoopEntry(RHS, L))
+ return false;
----------------
sanjoy wrote:
> I think this should be an assert -- if a caller is passing in unavailable SCEVs then it probably has other bugs too which this change will hide.
Hi Sanjoy, I did first time this as an assert, see https://reviews.llvm.org/rL323077.
And I revert it due to there were a lot of buildbot failures. Adding this check to every case makes the code is not readable :)
What do you think? Does it makes sense to do it as an assert and update all invocations in spite of readability?
https://reviews.llvm.org/D42417
More information about the llvm-commits
mailing list