xref: /llvm-project/llvm/test/MC/RISCV/rvv/fcompare.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
14vmfeq.vv v8, v4, v20, v0.t
15# CHECK-INST: vmfeq.vv v8, v4, v20, v0.t
16# CHECK-ENCODING: [0x57,0x14,0x4a,0x60]
17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
18# CHECK-UNKNOWN: 604a1457 <unknown>
19
20vmfeq.vv v8, v4, v20
21# CHECK-INST: vmfeq.vv v8, v4, v20
22# CHECK-ENCODING: [0x57,0x14,0x4a,0x62]
23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
24# CHECK-UNKNOWN: 624a1457 <unknown>
25
26vmfeq.vf v8, v4, fa0, v0.t
27# CHECK-INST: vmfeq.vf v8, v4, fa0, v0.t
28# CHECK-ENCODING: [0x57,0x54,0x45,0x60]
29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
30# CHECK-UNKNOWN: 60455457 <unknown>
31
32vmfeq.vf v8, v4, fa0
33# CHECK-INST: vmfeq.vf v8, v4, fa0
34# CHECK-ENCODING: [0x57,0x54,0x45,0x62]
35# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
36# CHECK-UNKNOWN: 62455457 <unknown>
37
38vmfne.vv v8, v4, v20, v0.t
39# CHECK-INST: vmfne.vv v8, v4, v20, v0.t
40# CHECK-ENCODING: [0x57,0x14,0x4a,0x70]
41# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
42# CHECK-UNKNOWN: 704a1457 <unknown>
43
44vmfne.vv v8, v4, v20
45# CHECK-INST: vmfne.vv v8, v4, v20
46# CHECK-ENCODING: [0x57,0x14,0x4a,0x72]
47# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
48# CHECK-UNKNOWN: 724a1457 <unknown>
49
50vmfne.vf v8, v4, fa0, v0.t
51# CHECK-INST: vmfne.vf v8, v4, fa0, v0.t
52# CHECK-ENCODING: [0x57,0x54,0x45,0x70]
53# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
54# CHECK-UNKNOWN: 70455457 <unknown>
55
56vmfne.vf v8, v4, fa0
57# CHECK-INST: vmfne.vf v8, v4, fa0
58# CHECK-ENCODING: [0x57,0x54,0x45,0x72]
59# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
60# CHECK-UNKNOWN: 72455457 <unknown>
61
62vmflt.vv v8, v4, v20, v0.t
63# CHECK-INST: vmflt.vv v8, v4, v20, v0.t
64# CHECK-ENCODING: [0x57,0x14,0x4a,0x6c]
65# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
66# CHECK-UNKNOWN: 6c4a1457 <unknown>
67
68vmflt.vv v8, v4, v20
69# CHECK-INST: vmflt.vv v8, v4, v20
70# CHECK-ENCODING: [0x57,0x14,0x4a,0x6e]
71# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
72# CHECK-UNKNOWN: 6e4a1457 <unknown>
73
74vmflt.vf v8, v4, fa0, v0.t
75# CHECK-INST: vmflt.vf v8, v4, fa0, v0.t
76# CHECK-ENCODING: [0x57,0x54,0x45,0x6c]
77# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
78# CHECK-UNKNOWN: 6c455457 <unknown>
79
80vmflt.vf v8, v4, fa0
81# CHECK-INST: vmflt.vf v8, v4, fa0
82# CHECK-ENCODING: [0x57,0x54,0x45,0x6e]
83# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
84# CHECK-UNKNOWN: 6e455457 <unknown>
85
86vmfle.vv v8, v4, v20, v0.t
87# CHECK-INST: vmfle.vv v8, v4, v20, v0.t
88# CHECK-ENCODING: [0x57,0x14,0x4a,0x64]
89# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
90# CHECK-UNKNOWN: 644a1457 <unknown>
91
92vmfle.vv v8, v4, v20
93# CHECK-INST: vmfle.vv v8, v4, v20
94# CHECK-ENCODING: [0x57,0x14,0x4a,0x66]
95# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
96# CHECK-UNKNOWN: 664a1457 <unknown>
97
98vmfle.vf v8, v4, fa0, v0.t
99# CHECK-INST: vmfle.vf v8, v4, fa0, v0.t
100# CHECK-ENCODING: [0x57,0x54,0x45,0x64]
101# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
102# CHECK-UNKNOWN: 64455457 <unknown>
103
104vmfle.vf v8, v4, fa0
105# CHECK-INST: vmfle.vf v8, v4, fa0
106# CHECK-ENCODING: [0x57,0x54,0x45,0x66]
107# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
108# CHECK-UNKNOWN: 66455457 <unknown>
109
110vmfgt.vf v8, v4, fa0, v0.t
111# CHECK-INST: vmfgt.vf v8, v4, fa0, v0.t
112# CHECK-ENCODING: [0x57,0x54,0x45,0x74]
113# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
114# CHECK-UNKNOWN: 74455457 <unknown>
115
116vmfgt.vf v8, v4, fa0
117# CHECK-INST: vmfgt.vf v8, v4, fa0
118# CHECK-ENCODING: [0x57,0x54,0x45,0x76]
119# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
120# CHECK-UNKNOWN: 76455457 <unknown>
121
122vmfge.vf v8, v4, fa0, v0.t
123# CHECK-INST: vmfge.vf v8, v4, fa0, v0.t
124# CHECK-ENCODING: [0x57,0x54,0x45,0x7c]
125# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
126# CHECK-UNKNOWN: 7c455457 <unknown>
127
128vmfge.vf v8, v4, fa0
129# CHECK-INST: vmfge.vf v8, v4, fa0
130# CHECK-ENCODING: [0x57,0x54,0x45,0x7e]
131# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
132# CHECK-UNKNOWN: 7e455457 <unknown>
133
134vmfgt.vv v8, v20, v4, v0.t
135# CHECK-INST: vmflt.vv v8, v4, v20, v0.t
136# CHECK-ENCODING: [0x57,0x14,0x4a,0x6c]
137# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
138# CHECK-UNKNOWN: 6c4a1457 <unknown>
139
140vmfgt.vv v8, v20, v4
141# CHECK-INST: vmflt.vv v8, v4, v20
142# CHECK-ENCODING: [0x57,0x14,0x4a,0x6e]
143# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
144# CHECK-UNKNOWN: 6e4a1457 <unknown>
145
146vmfge.vv v8, v20, v4, v0.t
147# CHECK-INST: vmfle.vv v8, v4, v20, v0.t
148# CHECK-ENCODING: [0x57,0x14,0x4a,0x64]
149# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
150# CHECK-UNKNOWN: 644a1457 <unknown>
151
152vmfge.vv v8, v20, v4
153# CHECK-INST: vmfle.vv v8, v4, v20
154# CHECK-ENCODING: [0x57,0x14,0x4a,0x66]
155# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
156# CHECK-UNKNOWN: 664a1457 <unknown>
157
158vmfeq.vv v0, v4, v20, v0.t
159# CHECK-INST: vmfeq.vv v0, v4, v20, v0.t
160# CHECK-ENCODING: [0x57,0x10,0x4a,0x60]
161# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f' (Vector Extensions for Embedded Processors){{$}}
162# CHECK-UNKNOWN: 604a1057 <unknown>
163