[llvm] [LV] Add support for widening loads/stores to a VF multiple (PR #217670)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 04:06:50 PDT 2026
MacDue wrote:
> What does this PR give us that is not already possible? or achievable elsewhere?
I think most things are achievable in multiple ways, so probably nothing, but I think this approach is more direct.
> Perhaps I'm missing a nuance but this just looks like a very complex way of grouping a set of N consecutive loads into one?
I don't think that's necessarily true. I think this is a rather simple way of grouping loads that's going to be robust and does not require extra analysis to rediscover the consecutive loads after the vectorizer. We know we have N-loads, so rather than break them up, then glue them back together, just emit a wide load.
> Even when expanded to masked_loads the problem does not changes much.
Again, I don't think that's fair. With masked loads we want to require the ALM phi into a form that can be recognized by #220960 too and also decide which memory operations should be widened (to use the AArch64 predicate-as-counter), and which should be split. We could try to recognize this after LV, but the pattern becomes more complex (matching and rewriting N-phis + extracts etc). Whereas the goal for that pass was to choose the IR that's already the closest match the predicate-as-counter, rather than use more complex matching. My thinking was this would keep the pass simple and more robust.
https://github.com/llvm/llvm-project/pull/217670
More information about the llvm-commits
mailing list