[llvm] ed687c0 - [RISCV] Fix incorrect operand type of inst alias for InstR4

Jim Lin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 22:00:49 PDT 2021


Author: Jim Lin
Date: 2021-09-25T11:25:12+08:00
New Revision: ed687c021161b87858260f8583bfc8b178903593

URL: https://github.com/llvm/llvm-project/commit/ed687c021161b87858260f8583bfc8b178903593
DIFF: https://github.com/llvm/llvm-project/commit/ed687c021161b87858260f8583bfc8b178903593.diff

LOG: [RISCV] Fix incorrect operand type of inst alias for InstR4

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D110381

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
index 575df86d27a8d..141453cd90d6f 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -920,11 +920,11 @@ def : InstAlias<".insn_r $opcode, $funct3, $funct7, $rd, $rs1, $rs2",
                 (InsnR AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, uimm7:$funct7,
                        AnyReg:$rs1, AnyReg:$rs2)>;
 // Accept 4 register form of ".insn r" as alias for ".insn r4".
-def : InstAlias<".insn_r $opcode, $funct3, $funct7, $rd, $rs1, $rs2, $rs3",
-                (InsnR4 AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, uimm7:$funct7,
+def : InstAlias<".insn_r $opcode, $funct3, $funct2, $rd, $rs1, $rs2, $rs3",
+                (InsnR4 AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, uimm2:$funct2,
                         AnyReg:$rs1, AnyReg:$rs2, AnyReg:$rs3)>;
-def : InstAlias<".insn_r4 $opcode, $funct3, $funct7, $rd, $rs1, $rs2, $rs3",
-                (InsnR4 AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, uimm7:$funct7,
+def : InstAlias<".insn_r4 $opcode, $funct3, $funct2, $rd, $rs1, $rs2, $rs3",
+                (InsnR4 AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, uimm2:$funct2,
                         AnyReg:$rs1, AnyReg:$rs2, AnyReg:$rs3)>;
 def : InstAlias<".insn_i $opcode, $funct3, $rd, $rs1, $imm12",
                 (InsnI AnyReg:$rd, uimm7:$opcode, uimm3:$funct3, AnyReg:$rs1,


        


More information about the llvm-commits mailing list