Skip to content

Commit 2d3d8df

Browse files
committed
[RISCV] Use RVPTernary_rrr for a few more instructions.
This doesn't really affect the assembler, but will be important when we eventually do codegen.
1 parent d6679d5 commit 2d3d8df

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoP.td

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,9 @@ let Predicates = [HasStdExtP] in {
636636
def PM2ADDASU_H : RVPBinary_rr<0b1101, 0b00, 0b101, "pm2addasu.h">;
637637
def PM4ADDASU_B : RVPBinary_rr<0b1101, 0b10, 0b101, "pm4addasu.b">;
638638
} // Predicates = [HasStdExtP]
639-
640639
let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
641-
def MQACC_H01 : RVPBinary_rr<0b1111, 0b00, 0b101, "mqacc.h01">;
642-
def MQRACC_H01 : RVPBinary_rr<0b1111, 0b10, 0b101, "mqracc.h01">;
640+
def MQACC_H01 : RVPTernary_rrr<0b1111, 0b00, 0b101, "mqacc.h01">;
641+
def MQRACC_H01 : RVPTernary_rrr<0b1111, 0b10, 0b101, "mqracc.h01">;
643642
} // // Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only"
644643
let Predicates = [HasStdExtP, IsRV64] in {
645644
def PM2ADD_W : RVPBinary_rr<0b0000, 0b01, 0b101, "pm2add.w">;
@@ -776,8 +775,8 @@ let Predicates = [HasStdExtP] in {
776775
def PMULHSU_H : RVPBinary_rr<0b1000, 0b00, 0b111, "pmulhsu.h">;
777776
def PMULHRSU_H : RVPBinary_rr<0b1000, 0b10, 0b111, "pmulhrsu.h">;
778777

779-
def PMHACCSU_H : RVPBinary_rr<0b1001, 0b00, 0b111, "pmhaccsu.h">;
780-
def PMHRACCSU_H : RVPBinary_rr<0b1001, 0b10, 0b111, "pmhraccsu.h">;
778+
def PMHACCSU_H : RVPTernary_rrr<0b1001, 0b00, 0b111, "pmhaccsu.h">;
779+
def PMHRACCSU_H : RVPTernary_rrr<0b1001, 0b10, 0b111, "pmhraccsu.h">;
781780

782781
def PMULQ_H : RVPBinary_rr<0b1010, 0b00, 0b111, "pmulq.h">;
783782
def PMULQR_H : RVPBinary_rr<0b1010, 0b10, 0b111, "pmulqr.h">;
@@ -835,8 +834,8 @@ let Predicates = [HasStdExtP, IsRV64] in {
835834
def PMULH_W_H0 : RVPBinary_rr<0b0100, 0b01, 0b111, "pmulh.w.h0">;
836835
def PMULHSU_W_H0 : RVPBinary_rr<0b0100, 0b11, 0b111, "pmulhsu.w.h0">;
837836

838-
def PMHACC_W_H0 : RVPBinary_rr<0b0101, 0b01, 0b111, "pmhacc.w.h0">;
839-
def PMHACCSU_W_H0 : RVPBinary_rr<0b0101, 0b11, 0b111, "pmhaccsu.w.h0">;
837+
def PMHACC_W_H0 : RVPTernary_rrr<0b0101, 0b01, 0b111, "pmhacc.w.h0">;
838+
def PMHACCSU_W_H0 : RVPTernary_rrr<0b0101, 0b11, 0b111, "pmhaccsu.w.h0">;
840839

841840
def PMULH_W_H1 : RVPBinary_rr<0b0110, 0b01, 0b111, "pmulh.w.h1">;
842841
def PMULHSU_W_H1 : RVPBinary_rr<0b0110, 0b11, 0b111, "pmulhsu.w.h1">;

0 commit comments

Comments
 (0)