[PATCH] D30446: [IndVars] Do not branch on poison
Andrew Trick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 09:34:23 PDT 2017
atrick added a subscriber: mzolotukhin.
atrick added a comment.
My suggestion was this: LFTR is not necessary this early in the pipeline if it's only purpose is converting a 'cmp slt' to 'cmp eq'. As long as SCEV can compute the trip count, the loop test shouldn't matter. If we really need to convert the loop test, it could be done during LSR and we could drop the 'nw' flags at that point.
We still want to remove sext/zext by widening, remove quadratic IVs, etc. It's not clear to me why we need to pessimize those particular test cases. In all those cases, is the problem that the rewritten loop test uses a possibly-poison IV? I don't even see nsw/nuw flags in the tests.
@mzolotukhin, if we do need to pessimize any of these cases, can you evaluate the performance impact, or suggest someone who can?
https://reviews.llvm.org/D30446
More information about the llvm-commits
mailing list