@@ -33,13 +33,13 @@ class RVInstRMoprr<bits<4> imm4, bits<3> imm3, bits<3> funct3, RISCVOpcode opcod
3333}
3434
3535// May-Be-Operations
36- def riscv_mopr : RVSDNode<"MOPR ",
37- SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
38- SDTCisSameAs<0, 2>]>>;
39- def riscv_moprr : RVSDNode<"MOPRR ",
40- SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
41- SDTCisSameAs<0, 2>,
42- SDTCisSameAs<0, 3>]>>;
36+ def riscv_mop_r : RVSDNode<"MOP_R ",
37+ SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
38+ SDTCisSameAs<0, 2>]>>;
39+ def riscv_mop_rr : RVSDNode<"MOP_RR ",
40+ SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
41+ SDTCisSameAs<0, 2>,
42+ SDTCisSameAs<0, 3>]>>;
4343
4444let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
4545class RVMopr<bits<7> imm7, bits<5> imm5, bits<3> funct3,
@@ -50,31 +50,32 @@ class RVMopr<bits<7> imm7, bits<5> imm5, bits<3> funct3,
5050let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
5151class RVMoprr<bits<4> imm4, bits<3> imm3, bits<3> funct3,
5252 RISCVOpcode opcode, string opcodestr>
53- : RVInstRMoprr<imm4, imm3, funct3, opcode, (outs GPR:$rd), (ins GPR:$rs1, GPR:$rs2),
53+ : RVInstRMoprr<imm4, imm3, funct3, opcode, (outs GPR:$rd),
54+ (ins GPR:$rs1, GPR:$rs2),
5455 opcodestr, "$rd, $rs1, $rs2">;
5556
5657foreach i = 0...31 in {
5758 let Predicates = [HasStdExtZimop] in
58- def MOPR #i : RVMopr<0b1000111, i, 0b100, OPC_SYSTEM, "mop.r."#i>,
59- Sched<[]>;
59+ def MOP_R_ #i : RVMopr<0b1000111, i, 0b100, OPC_SYSTEM, "mop.r."#i>,
60+ Sched<[]>;
6061}
6162
6263foreach i = 0...7 in {
6364 let Predicates = [HasStdExtZimop] in
64- def MOPRR #i : RVMoprr<0b1001, i, 0b100, OPC_SYSTEM, "mop.rr."#i>,
65+ def MOP_RR_ #i : RVMoprr<0b1001, i, 0b100, OPC_SYSTEM, "mop.rr."#i>,
6566 Sched<[]>;
6667}
6768
6869let Predicates = [HasStdExtZimop] in {
6970// Zimop instructions
7071foreach i = 0...31 in {
71- def : Pat<(XLenVT (riscv_mopr GPR:$rs1, (XLenVT i))),
72- (!cast<Instruction>("MOPR "#i) GPR:$rs1)>;
72+ def : Pat<(XLenVT (riscv_mop_r GPR:$rs1, (XLenVT i))),
73+ (!cast<Instruction>("MOP_R_ "#i) GPR:$rs1)>;
7374}
7475
7576foreach i = 0...7 in {
76- def : Pat<(XLenVT (riscv_moprr GPR:$rs1, GPR:$rs2, (XLenVT i))),
77- (!cast<Instruction>("MOPRR "#i) GPR:$rs1, GPR:$rs2)>;
77+ def : Pat<(XLenVT (riscv_mop_rr GPR:$rs1, GPR:$rs2, (XLenVT i))),
78+ (!cast<Instruction>("MOP_RR_ "#i) GPR:$rs1, GPR:$rs2)>;
7879}
7980
8081} // Predicates = [HasStdExtZimop]
0 commit comments