Skip to content

Commit 07b2bd9

Browse files
committed
Remove the instructions that belong to Zvfbfmin and Zvfbfwma from Zvfbfa
1 parent eb80e18 commit 07b2bd9

File tree

4 files changed

+10
-50
lines changed

4 files changed

+10
-50
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -693,25 +693,13 @@ def HasStdExtZvfbfmin : Predicate<"Subtarget->hasStdExtZvfbfmin()">,
693693
AssemblerPredicate<(all_of FeatureStdExtZvfbfmin),
694694
"'Zvfbfmin' (Vector BF16 Converts)">;
695695

696-
def HasStdExtZvfbfminOrZvfbfa
697-
: Predicate<"Subtarget->hasStdExtZvfbfmin() || Subtarget->hasStdExtZvfbfa()">,
698-
AssemblerPredicate<(any_of FeatureStdExtZvfbfmin, FeatureStdExtZvfbfa),
699-
"'Zvfbfmin' (Vector BF16 Converts) or "
700-
"'Zvfbfa' (Additional BF16 vector compute support)">;
701-
702696
def FeatureStdExtZvfbfwma
703697
: RISCVExtension<1, 0, "Vector BF16 widening mul-add",
704698
[FeatureStdExtZvfbfmin, FeatureStdExtZfbfmin]>;
705699
def HasStdExtZvfbfwma : Predicate<"Subtarget->hasStdExtZvfbfwma()">,
706700
AssemblerPredicate<(all_of FeatureStdExtZvfbfwma),
707701
"'Zvfbfwma' (Vector BF16 widening mul-add)">;
708702

709-
def HasStdExtZvfbfwmaOrZvfbfa
710-
: Predicate<"Subtarget->hasStdExtZvfbfwma() || Subtarget->hasStdExtZvfbfa()">,
711-
AssemblerPredicate<(any_of FeatureStdExtZvfbfwma, FeatureStdExtZvfbfa),
712-
"'Zvfbfwma' (Vector BF16 widening mul-add) or "
713-
"'Zvfbfa' (Additional BF16 vector compute support)">;
714-
715703
def FeatureStdExtZvfhmin
716704
: RISCVExtension<1, 0,
717705
"Vector Half-Precision Floating-Point Minimal",

llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
// Instructions
1818
//===----------------------------------------------------------------------===//
1919

20-
let Predicates = [HasStdExtZvfbfminOrZvfbfa], Constraints = "@earlyclobber $vd",
20+
let Predicates = [HasStdExtZvfbfmin], Constraints = "@earlyclobber $vd",
2121
mayRaiseFPException = true in {
2222
let RVVConstraint = WidenCvt, DestEEW = EEWSEWx2 in
2323
defm VFWCVTBF16_F_F_V : VWCVTF_FV_VS2<"vfwcvtbf16.f.f.v", 0b010010, 0b01101>;
2424
let Uses = [FRM, VL, VTYPE] in
2525
defm VFNCVTBF16_F_F_W : VNCVTF_FV_VS2<"vfncvtbf16.f.f.w", 0b010010, 0b11101>;
2626
}
2727

28-
let Predicates = [HasStdExtZvfbfwmaOrZvfbfa],
28+
let Predicates = [HasStdExtZvfbfwma],
2929
Constraints = "@earlyclobber $vd_wb, $vd = $vd_wb",
3030
RVVConstraint = WidenV, Uses = [FRM, VL, VTYPE], mayRaiseFPException = true,
3131
DestEEW = EEWSEWx2 in {

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

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,42 @@
11
# RUN: llvm-mc -triple=riscv32 -show-encoding -mattr=+zvfbfmin %s \
22
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3-
# RUN: llvm-mc -triple=riscv32 -show-encoding -mattr=+experimental-zvfbfa %s \
4-
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
53
# RUN: not llvm-mc -triple=riscv32 -show-encoding -mattr=+v,+f %s 2>&1 \
64
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
75
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+zvfbfmin %s \
86
# RUN: | llvm-objdump -d --mattr=+zvfbfmin - \
97
# RUN: | FileCheck %s --check-prefix=CHECK-INST
10-
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+experimental-zvfbfa %s \
11-
# RUN: | llvm-objdump -d --mattr=+experimental-zvfbfa - \
12-
# RUN: | FileCheck %s --check-prefix=CHECK-INST
138
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+zvfbfmin %s \
149
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
15-
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+experimental-zvfbfa %s \
16-
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
1710
# RUN: llvm-mc -triple=riscv64 -show-encoding -mattr=+zvfbfmin %s \
1811
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
19-
# RUN: llvm-mc -triple=riscv64 -show-encoding -mattr=+experimental-zvfbfa %s \
20-
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2112
# RUN: not llvm-mc -triple=riscv64 -show-encoding -mattr=+v,+f %s 2>&1 \
2213
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
2314
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+zvfbfmin %s \
2415
# RUN: | llvm-objdump -d --mattr=+zvfbfmin - \
2516
# RUN: | FileCheck %s --check-prefix=CHECK-INST
26-
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+experimental-zvfbfa %s \
27-
# RUN: | llvm-objdump -d --mattr=+experimental-zvfbfa - \
28-
# RUN: | FileCheck %s --check-prefix=CHECK-INST
2917
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+zvfbfmin %s \
3018
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
31-
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+experimental-zvfbfa %s \
32-
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
3319

3420
# CHECK-INST: vfncvtbf16.f.f.w v8, v4, v0.t
3521
# CHECK-ENCODING: [0x57,0x94,0x4e,0x48]
36-
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
22+
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts){{$}}
3723
# CHECK-UNKNOWN: 484e9457 <unknown>
3824
vfncvtbf16.f.f.w v8, v4, v0.t
3925

4026
# CHECK-INST: vfncvtbf16.f.f.w v8, v4
4127
# CHECK-ENCODING: [0x57,0x94,0x4e,0x4a]
42-
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
28+
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts){{$}}
4329
# CHECK-UNKNOWN: 4a4e9457 <unknown>
4430
vfncvtbf16.f.f.w v8, v4
4531

4632
# CHECK-INST: vfwcvtbf16.f.f.v v8, v4, v0.t
4733
# CHECK-ENCODING: [0x57,0x94,0x46,0x48]
48-
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
34+
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts){{$}}
4935
# CHECK-UNKNOWN: 48469457 <unknown>
5036
vfwcvtbf16.f.f.v v8, v4, v0.t
5137

5238
# CHECK-INST: vfwcvtbf16.f.f.v v8, v4
5339
# CHECK-ENCODING: [0x57,0x94,0x46,0x4a]
54-
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
40+
# CHECK-ERROR: instruction requires the following: 'Zvfbfmin' (Vector BF16 Converts){{$}}
5541
# CHECK-UNKNOWN: 4a469457 <unknown>
5642
vfwcvtbf16.f.f.v v8, v4

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

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,42 @@
11
# RUN: llvm-mc -triple=riscv32 -show-encoding -mattr=+zvfbfwma %s \
22
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3-
# RUN: llvm-mc -triple=riscv32 -show-encoding -mattr=+experimental-zvfbfa %s \
4-
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
53
# RUN: not llvm-mc -triple=riscv32 -show-encoding -mattr=+v,+f %s 2>&1 \
64
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
75
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+zvfbfwma %s \
86
# RUN: | llvm-objdump -d --mattr=+zvfbfwma --no-print-imm-hex - \
97
# RUN: | FileCheck %s --check-prefix=CHECK-INST
10-
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+experimental-zvfbfa %s \
11-
# RUN: | llvm-objdump -d --mattr=+experimental-zvfbfa --no-print-imm-hex - \
12-
# RUN: | FileCheck %s --check-prefix=CHECK-INST
138
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+zvfbfwma %s \
149
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
15-
# RUN: llvm-mc -triple=riscv32 -filetype=obj -mattr=+experimental-zvfbfa %s \
16-
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
1710
# RUN: llvm-mc -triple=riscv64 -show-encoding -mattr=+zvfbfwma %s \
1811
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
19-
# RUN: llvm-mc -triple=riscv64 -show-encoding -mattr=+experimental-zvfbfa %s \
20-
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2112
# RUN: not llvm-mc -triple=riscv64 -show-encoding -mattr=+v,+f %s 2>&1 \
2213
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
2314
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+zvfbfwma %s \
2415
# RUN: | llvm-objdump -d --mattr=+zvfbfwma --no-print-imm-hex - \
2516
# RUN: | FileCheck %s --check-prefix=CHECK-INST
26-
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+experimental-zvfbfa %s \
27-
# RUN: | llvm-objdump -d --mattr=+experimental-zvfbfa --no-print-imm-hex - \
28-
# RUN: | FileCheck %s --check-prefix=CHECK-INST
2917
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+zvfbfwma %s \
3018
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
31-
# RUN: llvm-mc -triple=riscv64 -filetype=obj -mattr=+experimental-zvfbfa %s \
32-
# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
3319

3420
# CHECK-INST: vfwmaccbf16.vv v8, v20, v4, v0.t
3521
# CHECK-ENCODING: [0x57,0x14,0x4a,0xec]
36-
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
22+
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add){{$}}
3723
# CHECK-UNKNOWN: ec4a1457 <unknown>
3824
vfwmaccbf16.vv v8, v20, v4, v0.t
3925

4026
# CHECK-INST: vfwmaccbf16.vv v8, v20, v4
4127
# CHECK-ENCODING: [0x57,0x14,0x4a,0xee]
42-
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
28+
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add){{$}}
4329
# CHECK-UNKNOWN: ee4a1457 <unknown>
4430
vfwmaccbf16.vv v8, v20, v4
4531

4632
# CHECK-INST: vfwmaccbf16.vf v8, fa0, v4, v0.t
4733
# CHECK-ENCODING: [0x57,0x54,0x45,0xec]
48-
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
34+
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add){{$}}
4935
# CHECK-UNKNOWN: ec455457 <unknown>
5036
vfwmaccbf16.vf v8, fa0, v4, v0.t
5137

5238
# CHECK-INST: vfwmaccbf16.vf v8, fa0, v4
5339
# CHECK-ENCODING: [0x57,0x54,0x45,0xee]
54-
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add) or 'Zvfbfa' (Additional BF16 vector compute support){{$}}
40+
# CHECK-ERROR: instruction requires the following: 'Zvfbfwma' (Vector BF16 widening mul-add){{$}}
5541
# CHECK-UNKNOWN: ee455457 <unknown>
5642
vfwmaccbf16.vf v8, fa0, v4

0 commit comments

Comments
 (0)