[PATCH] D72324: [LV] Still vectorise when tail-folding can't find a primary inducation variable
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 08:18:44 PST 2020
SjoerdMeijer marked an inline comment as done.
SjoerdMeijer added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7538
+ LVL.getLAI()) &&
+ Hints.getPredicate() != LoopVectorizeHints::FK_Disabled))
+ return CM_ScalarEpilogueNotNeededUsePredicate;
----------------
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`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72324/new/
https://reviews.llvm.org/D72324
More information about the llvm-commits
mailing list