[PATCH] D128342: [LoopVectorize] Disable tail-folding when masked interleaved accesses are unavailable
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 05:02:40 PDT 2022
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5074
+ // on an unpredicated vector loop + scalar epilogue then let's do it now.
+ if (UserVF.isZero() &&
+ ScalarEpilogueStatus == CM_ScalarEpilogueNotNeededUsePredicate) {
----------------
sdesmalen wrote:
> I'm not sure I understand where the `UserVF` comes into play with this choice, given that this a choice between "tail folding" vs "scalar epilogue". Can you elaborate?
So there is a MVE test that tries to force the use of tail-folding for a loop with masked interleaved accesses, and the test forces a particular VF. So I had two choices here:
1. Either fix the test to reflect the new behaviour, or
2. In cases where the user has explicitly requested tail-folding and forced a VF, then probably the user really wants tail-folding enabled for that VF.
Alternatively I could add a brand new flag controlling this behaviour, something like -use-tail-folding-when-interleaving, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128342/new/
https://reviews.llvm.org/D128342
More information about the llvm-commits
mailing list