[llvm] [LV] isScalarWithPredication to check for interleaved accesses (PR #194579)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 08:22:27 PDT 2026
gbossu wrote:
FYI: I'm still working on this, but it took me a lot of time to further decipher the interactions between the legacy cost model and VPlan execution. I'm now reasonably happy with my local changes and I'll probably end up posting a series of 3 small patches:
- Add a test to show that lacking gather/scatter causes LV to forbid if-conversion for scalable VFs
- Simplify `isScalarWithPredication` to trust the widening decision and only call it when required. This would fix the newly-added test case.
- In `collectInstsToScalarize`, update the widening decision instead of populating `InstsToScalarize`. This would ensure that VPlan execution always matches whatever we have decided is the best strategy, instead of `Decision == LoopVectorizationCostModel::CM_Interleave` or `CM.isProfitableToScalarize(I, VF)` taking precedence.
https://github.com/llvm/llvm-project/pull/194579
More information about the llvm-commits
mailing list