[llvm] [RISC-V] Add P-ext MC Support for More Pair Operations (PR #154088)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 10:25:56 PDT 2025
================
@@ -889,3 +965,94 @@ let Predicates = [HasStdExtP, IsRV32] in {
let Inst{23-15} = imm10{9-1};
}
}
+
+let Predicates = [HasStdExtP, IsRV32] in {
+ def PWSLLI_B : RVPWideningShiftB_ri<0b000, "pwslli.b">;
+ def PWSLLI_H : RVPWideningShiftH_ri<0b000, "pwslli.h">;
+ def WSLLI : RVPWideningShiftW_ri<0b000, "wslli">;
+
+ def PWSLAI_B : RVPWideningShiftB_ri<0b100, "pwslai.b">;
+ def PWSLAI_H : RVPWideningShiftH_ri<0b100, "pwslai.h">;
+ def WSLAI : RVPWideningShiftW_ri<0b100, "wslai">;
+
+ def PWSLL_BS : RVPWideningShift_rr<0b000, 0b00, "pwsll.bs">;
+ def PWSLL_HS : RVPWideningShift_rr<0b000, 0b01, "pwsll.hs">;
+ def WSLL : RVPWideningShift_rr<0b000, 0b11, "wsll">;
+
+ def PWSLA_BS : RVPWideningShift_rr<0b100, 0b00, "pwsla.bs">;
+ def PWSLA_HS : RVPWideningShift_rr<0b100, 0b01, "pwsla.hs">;
+ def WSLA : RVPWideningShift_rr<0b100, 0b11, "wsla">;
+
+ def WZIP8P : RVPWideningShift_rr<0b111, 0b00, "wzip8p">;
+ def WZIP16P : RVPWideningShift_rr<0b111, 0b01, "wzip16p">;
+
+ def PWADD_H : RVPWideningBinary_rr<0b0000, 0b00, "pwadd.h">;
+ def WADD : RVPWideningBinary_rr<0b0000, 0b01, "wadd">;
+ def PWADD_B : RVPWideningBinary_rr<0b0000, 0b10, "pwadd.b">;
+ def PW2WADD_H : RVPWideningBinary_rr<0b0000, 0b11, "pw2wadd.h">;
+
+ def PWADDA_H : RVPWideningBinary_rr<0b0001, 0b00, "pwadda.h">;
+ def WADDA : RVPWideningBinary_rr<0b0001, 0b01, "wadda">;
+ def PWADDA_B : RVPWideningBinary_rr<0b0001, 0b10, "pwadda.b">;
+ def PW2WADDA_H : RVPWideningBinary_rr<0b0001, 0b11, "pw2wadda.h">;
+
+ def PWADDU_H : RVPWideningBinary_rr<0b0010, 0b00, "pwaddu.h">;
+ def WADDU : RVPWideningBinary_rr<0b0010, 0b01, "waddu">;
+ def PWADDU_B : RVPWideningBinary_rr<0b0010, 0b10, "pwaddu.b">;
+ def PW2WADD_HX : RVPWideningBinary_rr<0b0010, 0b11, "pw2wadd.hx">;
+
+ def PWADDAU_H : RVPWideningBinary_rr<0b0011, 0b00, "pwaddau.h">;
+ def WADDAU : RVPWideningBinary_rr<0b0011, 0b01, "waddau">;
+ def PWADDAU_B : RVPWideningBinary_rr<0b0011, 0b10, "pwaddau.b">;
+ def PW2WADDA_HX : RVPWideningBinary_rr<0b0011, 0b11, "pw2wadda.hx">;
+
+ def PWMUL_H : RVPWideningBinary_rr<0b0100, 0b00, "pwmul.h">;
+ def WMUL : RVPWideningBinary_rr<0b0100, 0b01, "wmul">;
+ def PWMUL_B : RVPWideningBinary_rr<0b0100, 0b10, "pwmul.b">;
+ def PW2WADDU_H : RVPWideningBinary_rr<0b0100, 0b11, "pw2waddu.h">;
+
+ def PWMACC_H : RVPWideningBinary_rr<0b0101, 0b00, "pwmacc.h">;
----------------
topperc wrote:
This should be RVPWideningTernary_rrr.
https://github.com/llvm/llvm-project/pull/154088
More information about the llvm-commits
mailing list