[llvm] LV/EVL: strip TailFoldingStyle::DataWithoutLaneMask (PR #93303)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 11:38:59 PDT 2024
artagnon wrote:
> From my understanding `DataWithoutLaneMask` was just a rename of `PredicationStyle::None` done by https://reviews.llvm.org/D142887. If I got it right, there were not tests before and after that patch, until @alexey-bataev's patch.
I see. Thanks for the context.
> As for this style itself, it seems to be needed to guard IV overflow in its computation and uses: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L2482
Not sure I follow: isn't the code you pointed to emitting a runtime check when indvar-overflow-check is needed, and when the style is not `DataAndControlFlowWithoutRuntimeCheck`? What does it have to do with `DataWithoutLaneMask`?
> As for EVL vectorization, that check should not be needed due its increment by a result of `get.vector.length`
When the IV update may overflow, the code you pointed you creates a runtime-check (except in the case when the tail-folding style is DataAndControlFlowWithoutRuntimeCheck), and I think the commit message is incorrect: will update. When EVL isn't legal, whether we choose DataWithoutLaneMask or Data, shouldn't the runtime-check be created?
Okay, so there are really two changes in this PR:
1. When EVL is not legal, choose Data as the tail folding style. This part should be fine, right? Illegality of EVL should not imply non-availability of active.lane.mask, yes?
2. Stripping DataWithoutLaneMask tail-folding style. Since there is no provable correctness issue, would you prefer we keep this style?
https://github.com/llvm/llvm-project/pull/93303
More information about the llvm-commits
mailing list