xref: /llvm-project/llvm/test/MC/RISCV/rvv/fminmax.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \
2# RUN:         --mattr=+f \
3# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
4# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
5# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
6# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
7# RUN:         --mattr=+f \
8# RUN:        | llvm-objdump -d --mattr=+v --mattr=+f - \
9# RUN:        | FileCheck %s --check-prefix=CHECK-INST
10# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
11# RUN:         --mattr=+f \
12# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
13
14vfmin.vv v8, v4, v20, v0.t
15# CHECK-INST: vfmin.vv v8, v4, v20, v0.t
16# CHECK-ENCODING: [0x57,0x14,0x4a,0x10]
17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
18# CHECK-UNKNOWN: 104a1457 <unknown>
19
20vfmin.vv v8, v4, v20
21# CHECK-INST: vfmin.vv v8, v4, v20
22# CHECK-ENCODING: [0x57,0x14,0x4a,0x12]
23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
24# CHECK-UNKNOWN: 124a1457 <unknown>
25
26vfmin.vf v8, v4, fa0, v0.t
27# CHECK-INST: vfmin.vf v8, v4, fa0, v0.t
28# CHECK-ENCODING: [0x57,0x54,0x45,0x10]
29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
30# CHECK-UNKNOWN: 10455457 <unknown>
31
32vfmin.vf v8, v4, fa0
33# CHECK-INST: vfmin.vf v8, v4, fa0
34# CHECK-ENCODING: [0x57,0x54,0x45,0x12]
35# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
36# CHECK-UNKNOWN: 12455457 <unknown>
37
38vfmax.vv v8, v4, v20, v0.t
39# CHECK-INST: vfmax.vv v8, v4, v20, v0.t
40# CHECK-ENCODING: [0x57,0x14,0x4a,0x18]
41# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
42# CHECK-UNKNOWN: 184a1457 <unknown>
43
44vfmax.vv v8, v4, v20
45# CHECK-INST: vfmax.vv v8, v4, v20
46# CHECK-ENCODING: [0x57,0x14,0x4a,0x1a]
47# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
48# CHECK-UNKNOWN: 1a4a1457 <unknown>
49
50vfmax.vf v8, v4, fa0, v0.t
51# CHECK-INST: vfmax.vf v8, v4, fa0, v0.t
52# CHECK-ENCODING: [0x57,0x54,0x45,0x18]
53# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
54# CHECK-UNKNOWN: 18455457 <unknown>
55
56vfmax.vf v8, v4, fa0
57# CHECK-INST: vfmax.vf v8, v4, fa0
58# CHECK-ENCODING: [0x57,0x54,0x45,0x1a]
59# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
60# CHECK-UNKNOWN: 1a455457 <unknown>
61