[llvm] [NFC][LV] Separate control-flow masking from tail-folding masking. (PR #169509)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 06:46:38 PDT 2026
Mel-Chen wrote:
Does this seem to be caused by the trip count affecting whether tail folding is applied?
Since the trip count of the epilogue vector loop is much smaller than that of the main vector loop, often even guaranteed to be smaller than the main VF. Their tail-folding decisions end up being completely different.
I wonder if it’s possible to delay the tail-folding decision. We could first generate a non–tail-folding plans, then decide whether to apply tail folding and transform it accordingly. For epilogue vectorization, we could select from the non–tail-folding plans and then make the tail-folding decision again.
BTW, separating conditional masked operations from tail-folding masked operations might be a cleaner design, although it’s a bit harder to relate this directly to the final goal.
https://github.com/llvm/llvm-project/pull/169509
More information about the llvm-commits
mailing list