[llvm] [VPlan] Add transformation to narrow interleave groups. (PR #106441)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 12:55:45 PST 2024


================
@@ -1663,3 +1666,125 @@ void VPlanTransforms::createInterleaveGroups(
       }
   }
 }
+
+static bool supportedLoad(VPWidenRecipe *R0, VPValue *V, unsigned Idx) {
+  if (auto *W = dyn_cast_or_null<VPWidenLoadRecipe>(V->getDefiningRecipe())) {
+    return !W->getMask() && (R0->getOperand(0) == V || R0->getOperand(1) == V);
+  }
+
+  if (auto *IR = dyn_cast_or_null<VPInterleaveRecipe>(V->getDefiningRecipe())) {
+    return IR->getInterleaveGroup()->getFactor() ==
+               IR->getInterleaveGroup()->getNumMembers() &&
+           IR->getVPValue(Idx) == V;
+  }
----------------
fhahn wrote:

Done thanks

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


More information about the llvm-commits mailing list