[PATCH] D32729: LV: Don't vectorize with unknown loop counts on divergent targets

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 14:43:09 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D32729#785893, @arsenm wrote:

> In https://reviews.llvm.org/D32729#785871, @hfinkel wrote:
>
> > In https://reviews.llvm.org/D32729#785795, @arsenm wrote:
> >
> > > ping
> >
> >
> > I don't understand this patch. Unless there is both a vector and scalar loop, and I don't see how vectorizing the loop affects divergence between threads one way or the other. Do you really mean to prohibit vectorization when you have a dynamic trip count *and also* don't require a scalar loop? If so, you might look at https://reviews.llvm.org/D34373 which is related.
>
>
> Yes, the point is to avoid the additional condition where both loops could execute


Ah, okay. Adding that check on top of https://reviews.llvm.org/D34373 seems likely to be easy. I recommend doing that.


https://reviews.llvm.org/D32729





More information about the llvm-commits mailing list