[PATCH] D68577: [LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 12:19:47 PST 2019
Ayal added a comment.
In D68577#1741190 <https://reviews.llvm.org/D68577#1741190>, @efriedma wrote:
> In D68577#1739971 <https://reviews.llvm.org/D68577#1739971>, @Ayal wrote:
>
> > 1. Such loops can and should be optimized to have a simple induction variable with constant trip count regardless of (and prior to) LV.
>
>
> indvars does this transform. That said, it only runs once; in some cases, we manage to simplify the loop after indvars runs. Maybe it makes sense to run indvars again? We'd want to measure how much it actually triggers in practice.
Indeed indvars takes care of the testcase provided in https://reviews.llvm.org/D68577#1739605, leaving nothing to be vectorized. It does not handle the testcase of PR40816, though, presumably because of the store inside its loop (which prevents IndVarSimplify::PredicateLoopExits() from succeeding). Perhaps indvars should be extented to convert any loop to use a simple canonical IV whenever SCEV can compute its trip count.
Running indvars before LV might also relieve the latter from having to take care of live outs that are IV's.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68577/new/
https://reviews.llvm.org/D68577
More information about the llvm-commits
mailing list