[llvm] [IA][RISCV] Recognize deinterleaved loads that could lower to strided segmented loads (PR #151612)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 8 09:16:06 PDT 2025


https://github.com/preames commented:

Thinking about this patch a bit, I think you're conceptually combining two different things here: 1) Recognizing a potentially strided load (from the mask value), and 2) lowering a deinterleave + strided load.  

I'm tempted to start (likely in just a different patch since the code structure would be quite different) with the second case only, when the strided load is already explicit in IR.  Since this pass runs right after RISCVScatterGatherLowering, we can see such cases today.

That would let you directly exercise all the pseudo's and such without any of the API changes or masking complexity.

Once we had that, I'm tempted to pose the mask recognition as a prior transform to produce a strided.load intrinsic, but I recognize we'd have to produce some illegally typed intermediates.  Both options seem a bit ugly, maybe discuss offline?

https://github.com/llvm/llvm-project/pull/151612


More information about the llvm-commits mailing list