[PATCH] D50665: [LV][LAA] Vectorize loop invariant values stored into loop invariant address
Hideki Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 13:35:34 PDT 2018
hsaito added a comment.
In https://reviews.llvm.org/D50665#1208026, @anna wrote:
> In https://reviews.llvm.org/D50665#1206780, @Ayal wrote:
>
> > In https://reviews.llvm.org/D50665#1200509, @anna wrote:
> >
> > >
> >
> >
> > ...
> >
> > > Yes, the stores are scalarized. Identical replicas left as-is. Either passes such as load elimination can remove it, or we can clean it up in LV itself.
> >
> >
> >
> > - - by revisiting LoopVectorizationCostModel::collectLoopUniforms()? ;-)
>
>
> Right now, I just run instcombine after loop vectorization to clean up those unnecessary stores (and test cases make sure there's only one store left). Looks like there are other places in LV which relies on InstCombine as the clean up pass, so it may not be that bad after all? Thoughts?
Ideally, each optimizer should generate as clean output IR as it can feasibly do so. Cleaning up this particular "mess" is one of the simpler tasks LV can do on its own.
Repository:
rL LLVM
https://reviews.llvm.org/D50665
More information about the llvm-commits
mailing list