[PATCH] D52327: [Loop Vectorizer] Abandon vectorization when no integer IV found

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 15:22:53 PDT 2018


hsaito added a comment.

In https://reviews.llvm.org/D52327#1242578, @hfinkel wrote:

> In https://reviews.llvm.org/D52327#1242567, @efriedma wrote:
>
> > > can we compute the trip count for these loops?
> >
> > SCEV can compute the trip count for this testcase, yes.  See ScalarEvolution::computeExitCountExhaustively.
>
>
> Sure. That will do it.


Still doesn't move a needle on my priority list. We might be able to do this for fast-math mode, but that means loop trip count may be different depending on the FP optimizations performed. Not a very good program to begin with. Vectorizer has a long list of TODOs for optimizing practically-useful well-written code.

In any case, I think the proposed fix (or some other mechanism) is still needed since I don't think SCEV can compute trip count in all cases of FP primary inductions.

In https://reviews.llvm.org/D52327#1242439, @wristow wrote:

> Regarding the LIT test from https://reviews.llvm.org/D47216, isn't that essentially the same as the LIT test I have here?


I say yes and no. One induction versus two inductions. Given that there were none before, it's nice to have more than one, especially so if another one is handily available. I don't insist, though.


https://reviews.llvm.org/D52327





More information about the llvm-commits mailing list