[PATCH] D71071: [LV] Pick correct BB as insert point when fixing PHI for FORs.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 7 13:13:20 PST 2019


Ayal added a comment.

In D71071#1774076 <https://reviews.llvm.org/D71071#1774076>, @fhahn wrote:

> In D71071#1772329 <https://reviews.llvm.org/D71071#1772329>, @Ayal wrote:
>
> > Looks good to me with minor optional notes.
> >  Consider adding a target-indepedent test, e.g., augmenting first-order-recurrence.ll; tests can possibly be committed before the fix, demonstrating current behavior and then the change brought by this fix.
>
>
> I tried, but the test case requires tail folding and it seems to depend on an actual target. We make the decision to tail-fold in computeMaxVF (https://github.com/llvm/llvm-project/blob/c49194969430f0ee817498a7000a979a7a0ded03/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L4941) and use the max target VF, not the forced vector width. This seems a bit odd and we might want to change that, to make it easier to test tail-folding without any specific target. What do you think?


The `-prefer-predicate-over-epilog` flag should help test tail folding w/o a specific target. Admittedly it is currently used by target-dependent tests only.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71071/new/

https://reviews.llvm.org/D71071





More information about the llvm-commits mailing list