[llvm] [VPlan] Unroll VPReplicateRecipe by VF. (PR #142433)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 22 04:26:45 PDT 2025


================
@@ -224,6 +224,9 @@ struct Recipe_match {
     if ((!matchRecipeAndOpcode<RecipeTys>(R) && ...))
       return false;
 
+    auto *VPI = dyn_cast<VPInstruction>(R);
+    if (VPI && VPI->getOpcode() == VPInstruction::BuildVector)
+      return true;
     assert(R->getNumOperands() == std::tuple_size<Ops_t>::value &&
            "recipe with matched opcode does not have the expected number of "
            "operands");
----------------
ayalz wrote:

Independent nit: worth noting below that "Commutative" checks operands in reverse order, which works best for binary operations.

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


More information about the llvm-commits mailing list