[PATCH] D79783: [LV] Fallback strategies if tail-folding fails
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 02:20:48 PDT 2020
dmgreen added a comment.
Is the idea to turn this option on by default for MVE? Maybe by changing the preferPredicateOverEpilogue call?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:184
+// into the loop and predicate the loop body accordingly. If that fails,
+// there different fallback strategies depending on the option.
+namespace PreferPredicateTy {
----------------
-> there are different ...
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:193
+
+static cl::opt<PreferPredicateTy::Option> PreferPredicateOverEpilog(
+ "prefer-predicate-over-epilog",
----------------
Epilog -> Epilogue?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:203
+ clEnumValN(PreferPredicateTy::PredicateAndVectorize,
+ "predicate-vectorize",
+ "prefer tail-folding, attempt vectorization if "
----------------
Maybe call this predicate-else-scalar-epilog.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:204
+ "predicate-vectorize",
+ "prefer tail-folding, attempt vectorization if "
+ "tail-folding fails."),
----------------
-> "prefer tail-folding, create scalar epilogue if tail folding fails" ?
================
Comment at: llvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll:2
; RUN: opt < %s -loop-vectorize -S | FileCheck %s --check-prefixes=COMMON,DEFAULT
-; RUN: opt < %s -loop-vectorize -tail-predication=enabled -prefer-predicate-over-epilog -S | FileCheck %s --check-prefixes=COMMON,CHECK-TF,CHECK-PREFER
+; RUN: opt < %s -loop-vectorize -tail-predication=enabled -prefer-predicate-over-epilog=predicate-dont-vectorize -S | FileCheck %s --check-prefixes=COMMON,CHECK-TF,CHECK-PREFER
; RUN: opt < %s -loop-vectorize -tail-predication=enabled -S | FileCheck %s --check-prefixes=COMMON,CHECK-TF,CHECK-ENABLE-TP
----------------
What happens if we change this to predicate-vectorize? Would that be a better option for MVE? (or is that not what this test is really aiming to test?)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79783/new/
https://reviews.llvm.org/D79783
More information about the llvm-commits
mailing list