[PATCH] D72324: [LV] Still vectorise when tail-folding can't find a primary inducation variable
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 00:45:27 PST 2020
samparker accepted this revision.
samparker added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7538
+ LVL.getLAI()) &&
+ Hints.getPredicate() != LoopVectorizeHints::FK_Disabled))
+ return CM_ScalarEpilogueNotNeededUsePredicate;
----------------
SjoerdMeijer wrote:
> samparker wrote:
> > If a hint is provided to disable folding, then we shouldn't even look at any of the Prefer stuff, right? So PredicateOptDisabled = (PreferPredicateOverEpilog.getNumOccurrences() && !PreferPredicateOverEpilog) || Hints.getPredicate() == LoopVectorizeHints::FK_Disabled)
> We have these test cases:
>
> Transforms/LoopVectorize/ARM/tail-loop-folding.ll
> Transforms/LoopVectorize/X86/tail_loop_folding.ll
>
> That have functions with loop hint `predicate.enable=false` and also option `-prefer-predicate-over-epilog` set. The expected output (in these tests) is that this will enable predication, and thus the option overrides the loop hint. That's why I didn't move the loophint check to `PredicateOptDisabled`.
Bah, I've missed some brackets - sorry!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72324/new/
https://reviews.llvm.org/D72324
More information about the llvm-commits
mailing list