[clang] [llvm] [RISCV][P-ext] Support Packed Multiplication with Horizontal Addition and Accumulate intrinsics (PR #236303)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 21:38:56 PST 2026
================
@@ -13847,6 +13867,58 @@ SDValue RISCVTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
: RISCVISD::PM4ADDA;
return DAG.getNode(AccOpc, DL, MVT::i64, Rd, A, B);
}
+ case Intrinsic::riscv_pm2adda:
+ case Intrinsic::riscv_pm2adda_x:
+ case Intrinsic::riscv_pm2addau:
+ case Intrinsic::riscv_pmq2adda:
+ case Intrinsic::riscv_pmqr2adda:
+ case Intrinsic::riscv_pm2suba:
+ case Intrinsic::riscv_pm2suba_x:
+ case Intrinsic::riscv_pm2addasu: {
+ MVT VT = Op.getSimpleValueType();
+ SDValue Rd = Op.getOperand(1);
+ SDValue Rs1 = Op.getOperand(2);
+ SDValue Rs2 = Op.getOperand(3);
+ unsigned Opc = getRVPMulAddAccOpcode(IntNo);
+
+ if (VT == MVT::i32)
----------------
topperc wrote:
>Should I add dedicated builtins for those to match the other widths, or keep the current rd + pm4add form that folds to pm4adda.b?
Let's add the builtins that way everything is the same.
https://github.com/llvm/llvm-project/pull/236303
More information about the cfe-commits
mailing list