[llvm-branch-commits] [llvm] c628d63 - [RISCV] Add SMT_ prefix to SpacemiT instruction enum names. (#241053)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 11 01:51:38 PST 2026


Author: Craig Topper
Date: 2026-11-10T17:43:07-08:00
New Revision: c628d639fc66f8e6d8ab1f0cc6b1df38f974e020

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

LOG: [RISCV] Add SMT_ prefix to SpacemiT instruction enum names. (#241053)

Add "vtype" to end of names that become ambiguous. This represents the
additional operand the VMADOT II instructions have.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXSpacemiT.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXSpacemiT.td
index 2e51186360aec..375ce3d83d4f9 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoXSpacemiT.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXSpacemiT.td
@@ -67,45 +67,45 @@ let DecoderNamespace = "XSMT" in {
       // Base VMADOT II instructions
       // Support smt.vmadot/smt.vmadotu/smt.vmadotus/smt.vmadotsu
       foreach a = VTypeEncodes in
-        def VMADOT#!toupper(a.Name) :
+        def SMT_VMADOT#!toupper(a.Name)#"vtype" :
             SMTVMADotII<a.Encoding, "smt.vmadot"#a.Name>, Sched<[]>;
 
       // VMADOT Slide
       foreach a = SlideEncodes in
         foreach b = VTypeEncodes in
-          def VMADOT#!toupper(a.Name)#!toupper(b.Name):
+          def SMT_VMADOT#!toupper(a.Name)#!toupper(b.Name)#"vtype":
               SMTVMADotSlideII<a.Encoding, b.Encoding, "smt.vmadot"#a.Name#b.Name>, Sched<[]>;
 
       // Support smt.vmadot.sp/smt.vmadotu.sp/smt.vmadotus.sp/smt.vmadotsu.sp
       foreach a = VTypeEncodes in
-        def VMADOT#!toupper(a.Name)#_SP :
+        def SMT_VMADOT#!toupper(a.Name)#_SP :
             SMTVMADOTSP<a.Encoding, "smt.vmadot"#a.Name#".sp",
                         "$vd, $vs1, $vs2, $vmask, $imm2$vtype">, Sched<[]>;
 
       // Support smt.vmadot.hp/smt.vmadotu.hp/smt.vmadotus.hp/smt.vmadotsu.hp
       foreach c = HPEncodes in
-        def VMADOT#!toupper(c.Name)#_HP :
+        def SMT_VMADOT#!toupper(c.Name)#_HP :
             SMTVMADOTHP<c.Encoding, "smt.vmadot"#c.Name#".hp",
                         "$vd, $vs1, $vs2, $vmask, $imm3$vtype">, Sched<[]>;
 
       let DestEEW = EEWSEWx2, Constraints = "$vd = $vd_wb" in {
         // VFWMADOT
-        def VFWMADOT :
+        def SMT_VFWMADOT :
             SMTVFWMADOT<0b100, (outs VRM2:$vd_wb),
                         (ins VRM2:$vd, VR:$vs1, VR:$vs2),
                         "smt.vfwmadot", "$vd, $vs1, $vs2">, Sched<[]>;
         // VFWMADOT Slide
-        def VFWMADOT1 : VFWMADTSLIDE_INSN<0b101, "smt.vfwmadot1">;
-        def VFWMADOT2 : VFWMADTSLIDE_INSN<0b110, "smt.vfwmadot2">;
-        def VFWMADOT3 : VFWMADTSLIDE_INSN<0b111, "smt.vfwmadot3">;
+        def SMT_VFWMADOT1 : VFWMADTSLIDE_INSN<0b101, "smt.vfwmadot1">;
+        def SMT_VFWMADOT2 : VFWMADTSLIDE_INSN<0b110, "smt.vfwmadot2">;
+        def SMT_VFWMADOT3 : VFWMADTSLIDE_INSN<0b111, "smt.vfwmadot3">;
       }
 
-      def VNPACK_VV : VNPACK_INSN<0b0110001, 0b0, "smt.vnpack.vv">;
-      def VNSPACK_VV : VNPACK_INSN<0b0110001, 0b1, "smt.vnspack.vv">;
-      def VNPACK4_VV : VNPACK_INSN<0b0100001, 0b0, "smt.vnpack4.vv">;
-      def VNSPACK4_VV : VNPACK_INSN<0b0100001, 0b1, "smt.vnspack4.vv">;
-      def VPACK_VV : VPACK_INSN<0b0110011, 0b0, "smt.vpack.vv">;
-      def VUPACK_VV : VPACK_INSN<0b0110011, 0b1, "smt.vupack.vv">;
+      def SMT_VNPACK_VV : VNPACK_INSN<0b0110001, 0b0, "smt.vnpack.vv">;
+      def SMT_VNSPACK_VV : VNPACK_INSN<0b0110001, 0b1, "smt.vnspack.vv">;
+      def SMT_VNPACK4_VV : VNPACK_INSN<0b0100001, 0b0, "smt.vnpack4.vv">;
+      def SMT_VNSPACK4_VV : VNPACK_INSN<0b0100001, 0b1, "smt.vnspack4.vv">;
+      def SMT_VPACK_VV : VPACK_INSN<0b0110011, 0b0, "smt.vpack.vv">;
+      def SMT_VUPACK_VV : VPACK_INSN<0b0110011, 0b1, "smt.vupack.vv">;
     }
   }
 } // DecoderNamespace = "XSMT"


        


More information about the llvm-branch-commits mailing list