[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
Thu Oct 29 19:46:10 PDT 2026
================
@@ -2630,6 +2643,30 @@ let append Predicates = [IsRV32] in {
def : PatHorizontalMulAdd<riscv_pm4add, PM4ADDA_B, i32, v4i8>;
def : PatHorizontalMulAdd<riscv_pm4addu, PM4ADDAU_B, i32, v4i8>;
def : PatHorizontalMulAdd<riscv_pm4addsu, PM4ADDASU_B, i32, v4i8>;
+ def : PatHorizontalMulAdd<riscv_pm2add, PM2ADDA_H, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pm2add_x, PM2ADDA_HX, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pm2addu, PM2ADDAU_H, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pmq2add, PMQ2ADDA_H, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pmqr2add, PMQR2ADDA_H, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pm2sub, PM2SUBA_H, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pm2sub_x, PM2SUBA_HX, i32, v2i16>;
+ def : PatHorizontalMulAdd<riscv_pm2addsu, PM2ADDASU_H, i32, v2i16>;
+
+ // Direct ternary-accumulate forms of the above (used by the new
----------------
topperc wrote:
The use of "new" in this comment will quickly lose meaning over time.
https://github.com/llvm/llvm-project/pull/236303
More information about the cfe-commits
mailing list