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

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 11:24:01 PDT 2025


mshockwave wrote:

> > Turn the following deinterleaved load patterns
> > ```
> > %l = masked.load(%ptr, /*mask=*/110110110110, /*passthru=*/poison)
> > %f0 = shufflevector %l, [0, 3, 6, 9]
> > %f1 = shufflevector %l, [1, 4, 7, 10]
> > %f2 = shufflevector %l, [2, 5, 8, 11]
> > ```
> 
> Vectorizer do not generate shufflevector for the unused members. `%f2 = shufflevector %l, [2, 5, 8, 11]` should not be emitted.

Good to know. I cleaned up the test cases but keep the code that replaces those extracted-but-skipped fields with poison, since it's technically a correct thing to do

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


More information about the llvm-commits mailing list