Skip to content

Commit 74170fa

Browse files
committed
[RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension.
The full spec can be found at spacemit-x60 processor support scope: Section 2.1.2.2 (Features): https://developer.spacemit.com/documentation?token=BWbGwbx7liGW21kq9lucSA6Vnpb#2.1 This patch only supports assembler.
1 parent 0d05c42 commit 74170fa

File tree

9 files changed

+284
-0
lines changed

9 files changed

+284
-0
lines changed

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
// CHECK-NEXT: xsfvqmaccqoq 1.0 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
195195
// CHECK-NEXT: xsifivecdiscarddlone 1.0 'XSiFivecdiscarddlone' (SiFive sf.cdiscard.d.l1 Instruction)
196196
// CHECK-NEXT: xsifivecflushdlone 1.0 'XSiFivecflushdlone' (SiFive sf.cflush.d.l1 Instruction)
197+
// CHECK-NEXT: xsmtvdot 1.0 'XSMTVDot' (SpacemiT Vector Dot Product Extension)
197198
// CHECK-NEXT: xtheadba 1.0 'XTHeadBa' (T-Head address calculation instructions)
198199
// CHECK-NEXT: xtheadbb 1.0 'XTHeadBb' (T-Head basic bit-manipulation instructions)
199200
// CHECK-NEXT: xtheadbs 1.0 'XTHeadBs' (T-Head single-bit instructions)

llvm/docs/RISCVUsage.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ The current vendor extensions supported are:
531531
``XAndesVDot``
532532
LLVM implements `version 5.0.0 of the Andes Vector Dot Product Extension specification <https://github.com/andestech/andes-v5-isa/releases/download/ast-v5_4_0-release/AndeStar_V5_ISA_Spec_UM165-v1.5.08-20250317.pdf>`__ by Andes Technology. All instructions are prefixed with `nds.` as described in the specification.
533533

534+
``XSMTVDot``
535+
LLVM implements `version 1.0.0 of the SpacemiT Vector Dot Product Extension specification <https://developer.spacemit.com/documentation?token=BWbGwbx7liGW21kq9lucSA6Vnpb#2.1>`__ by SpacemiT. All instructions are prefixed with `smt.` as described in the specification.
536+
534537
Experimental C Intrinsics
535538
=========================
536539

llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,17 @@ static DecodeStatus DecodeVMV0RegisterClass(MCInst &Inst, uint32_t RegNo,
344344
return MCDisassembler::Success;
345345
}
346346

347+
static DecodeStatus DecodeVREvenRegisterClass(MCInst &Inst, uint32_t RegNo,
348+
uint64_t Address,
349+
const MCDisassembler *Decoder) {
350+
if (RegNo >= 32 || RegNo % 2)
351+
return MCDisassembler::Fail;
352+
353+
MCRegister Reg = RISCV::V0 + RegNo;
354+
Inst.addOperand(MCOperand::createReg(Reg));
355+
return MCDisassembler::Success;
356+
}
357+
347358
static DecodeStatus DecodeTRRegisterClass(MCInst &Inst, uint32_t RegNo,
348359
uint64_t Address,
349360
const MCDisassembler *Decoder) {
@@ -672,6 +683,8 @@ static constexpr FeatureBitset XAndesGroup = {
672683
RISCV::FeatureVendorXAndesVSIntLoad, RISCV::FeatureVendorXAndesVPackFPH,
673684
RISCV::FeatureVendorXAndesVDot};
674685

686+
static constexpr FeatureBitset XSMTGroup = {RISCV::FeatureVendorXSMTVDot};
687+
675688
static constexpr DecoderListEntry DecoderList32[]{
676689
// Vendor Extensions
677690
{DecoderTableXCV32, XCVFeatureGroup, "CORE-V extensions"},
@@ -692,6 +705,7 @@ static constexpr DecoderListEntry DecoderList32[]{
692705
{RISCV::FeatureVendorXMIPSCBOP},
693706
"MIPS mips.pref"},
694707
{DecoderTableXAndes32, XAndesGroup, "Andes extensions"},
708+
{DecoderTableXSMT32, XSMTGroup, "SpacemiT extensions"},
695709
// Standard Extensions
696710
{DecoderTable32, {}, "standard 32-bit instructions"},
697711
{DecoderTableRV32Only32, {}, "RV32-only standard 32-bit instructions"},

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,14 @@ def HasVendorXAndesVDot
16421642
AssemblerPredicate<(all_of FeatureVendorXAndesVDot),
16431643
"'XAndesVDot' (Andes Vector Dot Product Extension)">;
16441644

1645+
def FeatureVendorXSMTVDot
1646+
: RISCVExtension<1, 0, "SpacemiT Vector Dot Product Extension",
1647+
[FeatureStdExtV]>;
1648+
def HasVendorXSMTVDot
1649+
: Predicate<"Subtarget->hasVendorXSMTVDot()">,
1650+
AssemblerPredicate<(all_of FeatureVendorXSMTVDot),
1651+
"'XSMTVDot' (SpacemiT Vector Dot Product Extension)">;
1652+
16451653
//===----------------------------------------------------------------------===//
16461654
// LLVM specific features and extensions
16471655
//===----------------------------------------------------------------------===//

llvm/lib/Target/RISCV/RISCVInstrInfo.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,6 +2381,7 @@ include "RISCVInstrInfoXqccmp.td"
23812381
include "RISCVInstrInfoXMips.td"
23822382
include "RISCVInstrInfoXRivos.td"
23832383
include "RISCVInstrInfoXAndes.td"
2384+
include "RISCVInstrInfoXSMTVDot.td"
23842385

23852386
//===----------------------------------------------------------------------===//
23862387
// Global ISel
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
//===-- RISCVInstrInfoXSMTVDot.td - SpacemiT Vector Dot Product ----*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file describes the xsmtvdot vendor extensions defined by SpacemiT.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
//===----------------------------------------------------------------------===//
14+
// Operand definitions.
15+
//===----------------------------------------------------------------------===//
16+
17+
class SMTVDotOpcode<bits<7> val> {
18+
bits<7> Value = val;
19+
}
20+
21+
class SMTVEncoding2<bits<2> val> {
22+
bits<2> Value = val;
23+
}
24+
25+
def OPMMA : SMTVDotOpcode<0b1110001>;
26+
def OPMMA_SLIDE : SMTVDotOpcode<0b1110011>;
27+
28+
//===----------------------------------------------------------------------===//
29+
// Vector Dot-Product Sign Encoding
30+
// Defines the signed/unsigned mixing modes for vector dot-product operations.
31+
// Encoding format: [1:0] bits
32+
// 00: UU (Unsigned x Unsigned)
33+
// 01: US (Unsigned x Signed)
34+
// 10: SU (Signed x Unsigned)
35+
// 11: SS (Signed x Signed)
36+
//===----------------------------------------------------------------------===//
37+
def SMT_VDot_UU : SMTVEncoding2<0b00>;
38+
def SMT_VDot_US : SMTVEncoding2<0b01>;
39+
def SMT_VDot_SU : SMTVEncoding2<0b10>;
40+
def SMT_VDot_SS : SMTVEncoding2<0b11>;
41+
42+
//===----------------------------------------------------------------------===//
43+
// Vector Dot-Product Sliding Window Modes
44+
// Encoding format: [1:0] bits
45+
// 00: Slide1 (1-element sliding stride)
46+
// 01: Slide2 (2-element sliding stride)
47+
// 10: Slide3 (3-element sliding stride)
48+
// 11: Reserved
49+
//
50+
// Used in sliding-window dot-product operations:
51+
// vd = vs1 • vs2.slide{1|2|3} // • = dot product
52+
//===----------------------------------------------------------------------===//
53+
def SMT_VDot_Slide1 : SMTVEncoding2<0b00>;
54+
def SMT_VDot_Slide2 : SMTVEncoding2<0b01>;
55+
def SMT_VDot_Slide3 : SMTVEncoding2<0b10>;
56+
57+
//===----------------------------------------------------------------------===//
58+
// Instruction formats
59+
//===----------------------------------------------------------------------===//
60+
61+
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
62+
// Base vector dot product (no slide) format.
63+
class RVInstVDot<bits<2> sign, string opcodestr, string argstr>
64+
: RVInst<(outs VR:$vd), (ins VR:$vs1, VR:$vs2), opcodestr, argstr, [], InstFormatR> {
65+
bits<5> vd;
66+
bits<5> vs1;
67+
bits<5> vs2;
68+
69+
let Inst{31-25} = OPMMA.Value;
70+
let Inst{24-20} = vs2;
71+
let Inst{19-15} = vs1;
72+
let Inst{14} = 0b0;
73+
let Inst{13-12} = sign;
74+
let Inst{11-8} = vd{4-1};
75+
let Inst{7} = 0b0;
76+
let Inst{6-0} = OPC_CUSTOM_1.Value;
77+
}
78+
79+
// Sliding-window vector dot product format.
80+
class RVInstVDotSlide<bits<2>funct2, bits<2> sign, string opcodestr, string argstr>
81+
: RVInst<(outs VR:$vd), (ins VR:$vs1, VR:$vs2), opcodestr, argstr, [], InstFormatR> {
82+
bits<5> vd;
83+
bits<5> vs1;
84+
bits<5> vs2;
85+
86+
let Inst{31-25} = OPMMA_SLIDE.Value;
87+
let Inst{24-20} = vs2;
88+
let Inst{19-16} = vs1{4-1};
89+
let Inst{15-14} = funct2;
90+
let Inst{13-12} = sign;
91+
let Inst{11-8} = vd{4-1};
92+
let Inst{7} = 0b0;
93+
let Inst{6-0} = OPC_CUSTOM_1.Value;
94+
}
95+
}
96+
97+
//===----------------------------------------------------------------------===//
98+
// Instructions
99+
//===----------------------------------------------------------------------===//
100+
101+
let DecoderNamespace = "XSMT" in {
102+
103+
let Predicates = [HasVendorXSMTVDot] in {
104+
// Base vector dot product (no slide) instructions
105+
// NOTE: Destination registers (vd) MUST be even-numbered (v0, v2, ..., v30)
106+
// due to hardware alignment constraints. Using odd registers may cause undefined behavior.
107+
// TODO: Enforce even-numbered vd.
108+
def VMADOT : RVInstVDot<SMT_VDot_SS.Value{1-0}, "smt.vmadot", "$vd, $vs1, $vs2">;
109+
def VMADOTU : RVInstVDot<SMT_VDot_UU.Value{1-0}, "smt.vmadotu", "$vd, $vs1, $vs2">;
110+
def VMADOTSU : RVInstVDot<SMT_VDot_SU.Value{1-0}, "smt.vmadotsu", "$vd, $vs1, $vs2">;
111+
def VMADOTUU : RVInstVDot<SMT_VDot_US.Value{1-0}, "smt.vmadotus", "$vd, $vs1, $vs2">;
112+
113+
//===----------------------------------------------------------------------===//
114+
// Sliding-window Vector Dot Product Instructions
115+
//
116+
// The numeric suffix (1, 2, 3) specifies the stride of the sliding window:
117+
// 1: Window slides by 1 element per operation
118+
// 2: Window slides by 2 elements per operation
119+
// 3: Window slides by 3 elements per operation
120+
//
121+
// These instructions compute dot products with overlapping operand windows
122+
// where the window position increments by <N> elements between computations.
123+
//===----------------------------------------------------------------------===//
124+
// NOTE: Destination registers (vd) and first source register (vs1) MUST be
125+
// even-numbered (v0, v2, ..., v30) due to hardware alignment constraints.
126+
// Using odd registers may cause undefined behavior.
127+
// TODO: Enforce even-numbered vd.
128+
def VMADOT1 : RVInstVDotSlide<SMT_VDot_Slide1.Value, SMT_VDot_SS.Value{1-0}, "smt.vmadot1", "$vd, $vs1, $vs2">;
129+
def VMADOT1U : RVInstVDotSlide<SMT_VDot_Slide1.Value, SMT_VDot_UU.Value{1-0}, "smt.vmadot1u", "$vd, $vs1, $vs2">;
130+
def VMADOT1SU : RVInstVDotSlide<SMT_VDot_Slide1.Value, SMT_VDot_SU.Value{1-0}, "smt.vmadot1su", "$vd, $vs1, $vs2">;
131+
def VMADOT1UU : RVInstVDotSlide<SMT_VDot_Slide1.Value, SMT_VDot_US.Value{1-0}, "smt.vmadot1us", "$vd, $vs1, $vs2">;
132+
def VMADOT2 : RVInstVDotSlide<SMT_VDot_Slide2.Value, SMT_VDot_SS.Value{1-0}, "smt.vmadot2", "$vd, $vs1, $vs2">;
133+
def VMADOT2U : RVInstVDotSlide<SMT_VDot_Slide2.Value, SMT_VDot_UU.Value{1-0}, "smt.vmadot2u", "$vd, $vs1, $vs2">;
134+
def VMADOT2SU : RVInstVDotSlide<SMT_VDot_Slide2.Value, SMT_VDot_SU.Value{1-0}, "smt.vmadot2su", "$vd, $vs1, $vs2">;
135+
def VMADOT2UU : RVInstVDotSlide<SMT_VDot_Slide2.Value, SMT_VDot_US.Value{1-0}, "smt.vmadot2us", "$vd, $vs1, $vs2">;
136+
def VMADOT3 : RVInstVDotSlide<SMT_VDot_Slide3.Value, SMT_VDot_SS.Value{1-0}, "smt.vmadot3", "$vd, $vs1, $vs2">;
137+
def VMADOT3U : RVInstVDotSlide<SMT_VDot_Slide3.Value, SMT_VDot_UU.Value{1-0}, "smt.vmadot3u", "$vd, $vs1, $vs2">;
138+
def VMADOT3SU : RVInstVDotSlide<SMT_VDot_Slide3.Value, SMT_VDot_SU.Value{1-0}, "smt.vmadot3su", "$vd, $vs1, $vs2">;
139+
def VMADOT3UU : RVInstVDotSlide<SMT_VDot_Slide3.Value, SMT_VDot_US.Value{1-0}, "smt.vmadot3us", "$vd, $vs1, $vs2">;
140+
}
141+
}

llvm/test/CodeGen/RISCV/features-info.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
; CHECK-NEXT: xsfvqmaccqoq - 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4)).
218218
; CHECK-NEXT: xsifivecdiscarddlone - 'XSiFivecdiscarddlone' (SiFive sf.cdiscard.d.l1 Instruction).
219219
; CHECK-NEXT: xsifivecflushdlone - 'XSiFivecflushdlone' (SiFive sf.cflush.d.l1 Instruction).
220+
; CHECK-NEXT: xsmtvdot - 'XSMTVDot' (SpacemiT Vector Dot Product Extension).
220221
; CHECK-NEXT: xtheadba - 'XTHeadBa' (T-Head address calculation instructions).
221222
; CHECK-NEXT: xtheadbb - 'XTHeadBb' (T-Head basic bit-manipulation instructions).
222223
; CHECK-NEXT: xtheadbs - 'XTHeadBs' (T-Head single-bit instructions).

llvm/test/MC/RISCV/rvv/xsmtvdot.s

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# RUN: llvm-mc -triple=riscv32 -show-encoding --mattr=+xsmtvdot %s \
2+
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3+
# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+xsmtvdot %s \
4+
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5+
# RUN: not llvm-mc -triple=riscv32 -show-encoding %s 2>&1 \
6+
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7+
# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
8+
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
9+
# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+xsmtvdot %s \
10+
# RUN: | llvm-objdump -d --mattr=+xsmtvdot --no-print-imm-hex - \
11+
# RUN: | FileCheck %s --check-prefix=CHECK-INST
12+
# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+xsmtvdot %s \
13+
# RUN: | llvm-objdump -d --mattr=+xsmtvdot --no-print-imm-hex - \
14+
# RUN: | FileCheck %s --check-prefix=CHECK-INST
15+
# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+xsmtvdot %s \
16+
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
17+
# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+xsmtvdot %s \
18+
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
19+
20+
# CHECK-INST: smt.vmadot v16, v0, v8
21+
# CHECK-ENCODING: [0x2b,0x38,0x80,0xe2]
22+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
23+
# CHECK-UNKNOWN: e280382b <unknown>
24+
smt.vmadot v16, v0, v8
25+
26+
# CHECK-INST: smt.vmadotu v18, v1, v9
27+
# CHECK-ENCODING: [0x2b,0x89,0x90,0xe2]
28+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
29+
# CHECK-UNKNOWN: e290892b <unknown>
30+
smt.vmadotu v18, v1, v9
31+
32+
# CHECK-INST: smt.vmadotsu v20, v2, v10
33+
# CHECK-ENCODING: [0x2b,0x2a,0xa1,0xe2]
34+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
35+
# CHECK-UNKNOWN: e2a12a2b <unknown>
36+
smt.vmadotsu v20, v2, v10
37+
38+
# CHECK-INST: smt.vmadotus v22, v3, v11
39+
# CHECK-ENCODING: [0x2b,0x9b,0xb1,0xe2]
40+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
41+
# CHECK-UNKNOWN: e2b19b2b <unknown>
42+
smt.vmadotus v22, v3, v11
43+
44+
# CHECK-INST: smt.vmadot1 v24, v16, v12
45+
# CHECK-ENCODING: [0x2b,0x3c,0xc8,0xe6]
46+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
47+
# CHECK-UNKNOWN: e6c83c2b <unknown>
48+
smt.vmadot1 v24, v16, v12
49+
50+
# CHECK-INST: smt.vmadot1u v26, v18, v13
51+
# CHECK-ENCODING: [0x2b,0x0d,0xd9,0xe6]
52+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
53+
# CHECK-UNKNOWN: e6d90d2b <unknown>
54+
smt.vmadot1u v26, v18, v13
55+
56+
# CHECK-INST: smt.vmadot1su v28, v20, v14
57+
# CHECK-ENCODING: [0x2b,0x2e,0xea,0xe6]
58+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
59+
# CHECK-UNKNOWN: e6ea2e2b <unknown>
60+
smt.vmadot1su v28, v20, v14
61+
62+
# CHECK-INST: smt.vmadot1us v30, v22, v15
63+
# CHECK-ENCODING: [0x2b,0x1f,0xfb,0xe6]
64+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
65+
# CHECK-UNKNOWN: e6fb1f2b <unknown>
66+
smt.vmadot1us v30, v22, v15
67+
68+
# CHECK-INST: smt.vmadot2 v0, v24, v4
69+
# CHECK-ENCODING: [0x2b,0x70,0x4c,0xe6]
70+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
71+
# CHECK-UNKNOWN: e64c702b <unknown>
72+
smt.vmadot2 v0, v24, v4
73+
74+
# CHECK-INST: smt.vmadot2u v2, v26, v5
75+
# CHECK-ENCODING: [0x2b,0x41,0x5d,0xe6]
76+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
77+
# CHECK-UNKNOWN: e65d412b <unknown>
78+
smt.vmadot2u v2, v26, v5
79+
80+
# CHECK-INST: smt.vmadot2su v4, v28, v6
81+
# CHECK-ENCODING: [0x2b,0x62,0x6e,0xe6]
82+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
83+
# CHECK-UNKNOWN: e66e622b <unknown>
84+
smt.vmadot2su v4, v28, v6
85+
86+
# CHECK-INST: smt.vmadot2us v6, v30, v7
87+
# CHECK-ENCODING: [0x2b,0x53,0x7f,0xe6]
88+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
89+
# CHECK-UNKNOWN: e67f532b <unknown>
90+
smt.vmadot2us v6, v30, v7
91+
92+
# CHECK-INST: smt.vmadot3 v8, v0, v8
93+
# CHECK-ENCODING: [0x2b,0xb4,0x80,0xe6]
94+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
95+
# CHECK-UNKNOWN: e680b42b <unknown>
96+
smt.vmadot3 v8, v0, v8
97+
98+
# CHECK-INST: smt.vmadot3u v10, v2, v9
99+
# CHECK-ENCODING: [0x2b,0x85,0x91,0xe6]
100+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
101+
# CHECK-UNKNOWN: e691852b <unknown>
102+
smt.vmadot3u v10, v2, v9
103+
104+
# CHECK-INST: smt.vmadot3su v12, v4, v10
105+
# CHECK-ENCODING: [0x2b,0xa6,0xa2,0xe6]
106+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
107+
# CHECK-UNKNOWN: e6a2a62b <unknown>
108+
smt.vmadot3su v12, v4, v10
109+
110+
# CHECK-INST: smt.vmadot3us v14, v6, v11
111+
# CHECK-ENCODING: [0x2b,0x97,0xb3,0xe6]
112+
# CHECK-ERROR: instruction requires the following: 'XSMTVDot' (SpacemiT Vector Dot Product Extension){{$}}
113+
# CHECK-UNKNOWN: e6b3972b <unknown>
114+
smt.vmadot3us v14, v6, v11

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,7 @@ R"(All available -march extensions for RISC-V
11651165
xsfvqmaccqoq 1.0
11661166
xsifivecdiscarddlone 1.0
11671167
xsifivecflushdlone 1.0
1168+
xsmtvdot 1.0
11681169
xtheadba 1.0
11691170
xtheadbb 1.0
11701171
xtheadbs 1.0

0 commit comments

Comments
 (0)