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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 15:06:54 PDT 2025


================
@@ -249,11 +249,33 @@ static bool isReInterleaveMask(ShuffleVectorInst *SVI, unsigned &Factor,
   return false;
 }
 
+// Return the corresponded deinterleaved mask, or nullptr if there is no valid
+// mask.
+static Value *getMask(Value *WideMask, unsigned Factor,
+                      ElementCount LeafValueEC);
+
+static Value *getMask(Value *WideMask, unsigned Factor,
+                      VectorType *LeafValueTy) {
+  return getMask(WideMask, Factor, LeafValueTy->getElementCount());
+}
+
 bool InterleavedAccessImpl::lowerInterleavedLoad(
-    LoadInst *LI, SmallSetVector<Instruction *, 32> &DeadInsts) {
-  if (!LI->isSimple() || isa<ScalableVectorType>(LI->getType()))
+    Instruction *LoadOp, SmallSetVector<Instruction *, 32> &DeadInsts) {
----------------
topperc wrote:

Can this just be `Load`? I'm not sure the `Op` is providing any value.

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


More information about the llvm-commits mailing list