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

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 13:42:02 PDT 2018


anna added a comment.

In https://reviews.llvm.org/D52327#1242414, @hsaito wrote:

> In https://reviews.llvm.org/D52327#1242411, @efriedma wrote:
>
> > Why do we need an integer induction variable?  If one doesn't exist, it should be straightforward to create one.
>
>
> Is there a practical need (i.e., beyond academic interest) to vectorize such code? Examples?


I think that's a separate question, i.e. improving the vectorizer without depending on real world benchmarks is a good thing (especially if it's not a fundamental change). So, it looks like the LV is currently limited in vectorizing FP loops where we don't have an integer IV. It's worthwhile to see whether adding the integer IV and related cost model changes allows us to vectorize such loops on some targets? Maybe the cost model will prove that even though vectorizing is possible, it may not be beneficial. Disclaimer: This is speculation, I have not done any analysis here.

That stated, I believe fixing the PR and the crash is a good change (and orthogonal to the question of adding integer IV).


https://reviews.llvm.org/D52327





More information about the llvm-commits mailing list