[PATCH] D142109: [LoopVectorize] Remove runtime check and scalar tail loop when tail-folding.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 07:35:06 PST 2023
fhahn added a comment.
Would it be possible to have at least one target-independent patch by passing the style as option>?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1558
+ return FoldTailByMasking &&
+ (TTI.getPreferredTailFoldingStyle() ==
+ TailFoldingStyle::DataAndControlFlow ||
----------------
Having a helper to check if the style means using ActiveLaneMask would probably help to make some of the code below a bit more compact and clearer.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8753
+ if (Style == TailFoldingStyle::DataAndControlFlow ||
+ Style == TailFoldingStyle::DataAndControlFlowWithoutRuntimeCheck) {
// Create the active lane mask instruction in the vplan preheader.
----------------
The code for handling ActiveLaneMask now as grown quite a bit. Do you think it would be possible to separate the logic in different functions? Not in this patch ,but as general cleanup?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142109/new/
https://reviews.llvm.org/D142109
More information about the llvm-commits
mailing list