[llvm] [IA][RISCV] Add support for vp.load/vp.store with shufflevector (PR #135445)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 15 07:13:27 PDT 2025


================
@@ -339,25 +371,61 @@ bool InterleavedAccessImpl::lowerInterleavedLoad(
     return false;
 
   bool BinOpShuffleChanged =
-      replaceBinOpShuffles(BinOpShuffles.getArrayRef(), Shuffles, LI);
+      replaceBinOpShuffles(BinOpShuffles.getArrayRef(), Shuffles, LoadOp);
+
+  // Check if we extract only the unmasked elements.
+  if (MaskedIndices.any()) {
+    if (any_of(Shuffles, [&](const auto *Shuffle) {
+          ArrayRef<int> ShuffleMask = Shuffle->getShuffleMask();
+          for (int Idx : ShuffleMask) {
+            if (Idx < 0)
+              continue;
+            if (MaskedIndices.test(unsigned(Idx)))
----------------
alexey-bataev wrote:

`if (MaskedIndices.test(Idx))`

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


More information about the llvm-commits mailing list