Skip to content

Commit 0a2b979

Browse files
authored
[RISCV] Add missing Zvl dependencies for XSfvqmaccdod/XSfvqmaccqoq/XSfvfwmaccqqq. (llvm#150346)
These have an LMUL=1 operand that must have a multiple of 16 or 32 elements in it. This places a lower bound on the VLEN.
1 parent 3e4be55 commit 0a2b979

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ def FeatureVendorXSfmm128t
12721272
def FeatureVendorXSfvqmaccdod
12731273
: RISCVExtension<1, 0,
12741274
"SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2)",
1275-
[FeatureStdExtZve32x]>;
1275+
[FeatureStdExtZve32x, FeatureStdExtZvl128b]>;
12761276
def HasVendorXSfvqmaccdod
12771277
: Predicate<"Subtarget->hasVendorXSfvqmaccdod()">,
12781278
AssemblerPredicate<(all_of FeatureVendorXSfvqmaccdod),
@@ -1281,7 +1281,7 @@ def HasVendorXSfvqmaccdod
12811281
def FeatureVendorXSfvqmaccqoq
12821282
: RISCVExtension<1, 0,
12831283
"SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4)",
1284-
[FeatureStdExtZve32x]>;
1284+
[FeatureStdExtZve32x, FeatureStdExtZvl256b]>;
12851285
def HasVendorXSfvqmaccqoq
12861286
: Predicate<"Subtarget->hasVendorXSfvqmaccqoq()">,
12871287
AssemblerPredicate<(all_of FeatureVendorXSfvqmaccqoq),
@@ -1290,7 +1290,7 @@ def HasVendorXSfvqmaccqoq
12901290
def FeatureVendorXSfvfwmaccqqq
12911291
: RISCVExtension<1, 0,
12921292
"SiFive Matrix Multiply Accumulate Instruction (4-by-4)",
1293-
[FeatureStdExtZvfbfmin]>;
1293+
[FeatureStdExtZvfbfmin, FeatureStdExtZvl128b]>;
12941294
def HasVendorXSfvfwmaccqqq
12951295
: Predicate<"Subtarget->hasVendorXSfvfwmaccqqq()">,
12961296
AssemblerPredicate<(all_of FeatureVendorXSfvfwmaccqqq),

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
; RV32XCVMEM: .attribute 5, "rv32i2p1_xcvmem1p0"
436436
; RV32XCVSIMD: .attribute 5, "rv32i2p1_xcvsimd1p0"
437437
; RV32XCVBI: .attribute 5, "rv32i2p1_xcvbi1p0"
438-
; RV32XSFVFWMACCQQQ: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl32b1p0_xsfvfwmaccqqq1p0"
438+
; RV32XSFVFWMACCQQQ: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xsfvfwmaccqqq1p0"
439439
; RV32XTHEADCMO: .attribute 5, "rv32i2p1_xtheadcmo1p0"
440440
; RV32XTHEADCONDMOV: .attribute 5, "rv32i2p1_xtheadcondmov1p0"
441441
; RV32XTHEADFMEMIDX: .attribute 5, "rv32i2p1_xtheadfmemidx1p0"
@@ -610,7 +610,7 @@
610610
; RV64SVVPTC: .attribute 5, "rv64i2p1_svvptc1p0"
611611
; RV64SVINVAL: .attribute 5, "rv64i2p1_svinval1p0"
612612
; RV64XVENTANACONDOPS: .attribute 5, "rv64i2p1_xventanacondops1p0"
613-
; RV64XSFVFWMACCQQQ: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl32b1p0_xsfvfwmaccqqq1p0"
613+
; RV64XSFVFWMACCQQQ: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xsfvfwmaccqqq1p0"
614614
; RV64XTHEADBA: .attribute 5, "rv64i2p1_xtheadba1p0"
615615
; RV64XTHEADBB: .attribute 5, "rv64i2p1_xtheadbb1p0"
616616
; RV64XTHEADBS: .attribute 5, "rv64i2p1_xtheadbs1p0"

llvm/test/MC/RISCV/attribute-arch.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@
448448
# CHECK: .attribute 5, "rv32i2p1_zilsd1p0"
449449

450450
.attribute arch, "rv64i_xsfvfwmaccqqq"
451-
# CHECK: attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl32b1p0_xsfvfwmaccqqq1p0"
451+
# CHECK: attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvfbfmin1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xsfvfwmaccqqq1p0"
452452

453453
.attribute arch, "rv32i_ssnpm1p0"
454454
# CHECK: attribute 5, "rv32i2p1_ssnpm1p0"

0 commit comments

Comments
 (0)