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

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


================
@@ -302,6 +312,10 @@ using AllBinaryRecipe_match =
     BinaryRecipe_match<Op0_t, Op1_t, Opcode, Commutative, VPWidenRecipe,
                        VPReplicateRecipe, VPWidenCastRecipe, VPInstruction>;
 
+inline ZeroOpVPInstruction_match<VPInstruction::BuildVector> m_BuildVector() {
+  return ZeroOpVPInstruction_match<VPInstruction::BuildVector>();
+}
+
----------------
ayalz wrote:

```suggestion
/// BuildVector is matches only its opcode, w/o matching its operands.
inline ZeroOpVPInstruction_match<VPInstruction::BuildVector> m_BuildVector() {
  return ZeroOpVPInstruction_match<VPInstruction::BuildVector>();
}

```
plus some explanation why - number of operands varies?

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


More information about the llvm-commits mailing list