Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / FP8_SVE2 / fcvt.s
blob2301935db012f06253947355400a76f28bbe1123
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2,+fp8 < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2,+fp8 < %s \
4 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8 < %s \
8 // RUN: | llvm-objdump -d --mattr=+sve2,+fp8 - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8 < %s \
10 // RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
12 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2,+fp8 < %s \
13 // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
14 // RUN: | llvm-mc -triple=aarch64 -mattr=+sve2,+fp8 -disassemble -show-encoding \
15 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
18 // F1CVT instructions
20 f1cvt z0.h, z0.b // 01100101-00001000-00110000-00000000
21 // CHECK-INST: f1cvt z0.h, z0.b
22 // CHECK-ENCODING: [0x00,0x30,0x08,0x65]
23 // CHECK-ERROR: instruction requires: fp8 sve2
24 // CHECK-UNKNOWN: 65083000 <unknown>
26 f1cvt z0.h, z31.b // 01100101-00001000-00110011-11100000
27 // CHECK-INST: f1cvt z0.h, z31.b
28 // CHECK-ENCODING: [0xe0,0x33,0x08,0x65]
29 // CHECK-ERROR: instruction requires: fp8 sve2
30 // CHECK-UNKNOWN: 650833e0 <unknown>
32 f1cvt z31.h, z0.b // 01100101-00001000-00110000-00011111
33 // CHECK-INST: f1cvt z31.h, z0.b
34 // CHECK-ENCODING: [0x1f,0x30,0x08,0x65]
35 // CHECK-ERROR: instruction requires: fp8 sve2
36 // CHECK-UNKNOWN: 6508301f <unknown>
38 f1cvt z31.h, z31.b // 01100101-00001000-00110011-11111111
39 // CHECK-INST: f1cvt z31.h, z31.b
40 // CHECK-ENCODING: [0xff,0x33,0x08,0x65]
41 // CHECK-ERROR: instruction requires: fp8 sve2
42 // CHECK-UNKNOWN: 650833ff <unknown>
45 // F2CVT instructions
47 f2cvt z0.h, z0.b // 01100101-00001000-00110100-00000000
48 // CHECK-INST: f2cvt z0.h, z0.b
49 // CHECK-ENCODING: [0x00,0x34,0x08,0x65]
50 // CHECK-ERROR: instruction requires: fp8 sve2
51 // CHECK-UNKNOWN: 65083400 <unknown>
53 f2cvt z0.h, z31.b // 01100101-00001000-00110111-11100000
54 // CHECK-INST: f2cvt z0.h, z31.b
55 // CHECK-ENCODING: [0xe0,0x37,0x08,0x65]
56 // CHECK-ERROR: instruction requires: fp8 sve2
57 // CHECK-UNKNOWN: 650837e0 <unknown>
59 f2cvt z31.h, z0.b // 01100101-00001000-00110100-00011111
60 // CHECK-INST: f2cvt z31.h, z0.b
61 // CHECK-ENCODING: [0x1f,0x34,0x08,0x65]
62 // CHECK-ERROR: instruction requires: fp8 sve2
63 // CHECK-UNKNOWN: 6508341f <unknown>
65 f2cvt z31.h, z31.b // 01100101-00001000-00110111-11111111
66 // CHECK-INST: f2cvt z31.h, z31.b
67 // CHECK-ENCODING: [0xff,0x37,0x08,0x65]
68 // CHECK-ERROR: instruction requires: fp8 sve2
69 // CHECK-UNKNOWN: 650837ff <unknown>
73 // BF1CVT instructions
75 bf1cvt z0.h, z0.b // 01100101-00001000-00111000-00000000
76 // CHECK-INST: bf1cvt z0.h, z0.b
77 // CHECK-ENCODING: [0x00,0x38,0x08,0x65]
78 // CHECK-ERROR: instruction requires: fp8 sve2
79 // CHECK-UNKNOWN: 65083800 <unknown>
81 bf1cvt z0.h, z31.b // 01100101-00001000-00111011-11100000
82 // CHECK-INST: bf1cvt z0.h, z31.b
83 // CHECK-ENCODING: [0xe0,0x3b,0x08,0x65]
84 // CHECK-ERROR: instruction requires: fp8 sve2
85 // CHECK-UNKNOWN: 65083be0 <unknown>
87 bf1cvt z31.h, z0.b // 01100101-00001000-00111000-00011111
88 // CHECK-INST: bf1cvt z31.h, z0.b
89 // CHECK-ENCODING: [0x1f,0x38,0x08,0x65]
90 // CHECK-ERROR: instruction requires: fp8 sve2
91 // CHECK-UNKNOWN: 6508381f <unknown>
93 bf1cvt z31.h, z31.b // 01100101-00001000-00111011-11111111
94 // CHECK-INST: bf1cvt z31.h, z31.b
95 // CHECK-ENCODING: [0xff,0x3b,0x08,0x65]
96 // CHECK-ERROR: instruction requires: fp8 sve2
97 // CHECK-UNKNOWN: 65083bff <unknown>
101 // BF2CVT instructions
103 bf2cvt z0.h, z0.b // 01100101-00001000-00111100-00000000
104 // CHECK-INST: bf2cvt z0.h, z0.b
105 // CHECK-ENCODING: [0x00,0x3c,0x08,0x65]
106 // CHECK-ERROR: instruction requires: fp8 sve2
107 // CHECK-UNKNOWN: 65083c00 <unknown>
109 bf2cvt z0.h, z31.b // 01100101-00001000-00111111-11100000
110 // CHECK-INST: bf2cvt z0.h, z31.b
111 // CHECK-ENCODING: [0xe0,0x3f,0x08,0x65]
112 // CHECK-ERROR: instruction requires: fp8 sve2
113 // CHECK-UNKNOWN: 65083fe0 <unknown>
115 bf2cvt z31.h, z0.b // 01100101-00001000-00111100-00011111
116 // CHECK-INST: bf2cvt z31.h, z0.b
117 // CHECK-ENCODING: [0x1f,0x3c,0x08,0x65]
118 // CHECK-ERROR: instruction requires: fp8 sve2
119 // CHECK-UNKNOWN: 65083c1f <unknown>
121 bf2cvt z31.h, z31.b // 01100101-00001000-00111111-11111111
122 // CHECK-INST: bf2cvt z31.h, z31.b
123 // CHECK-ENCODING: [0xff,0x3f,0x08,0x65]
124 // CHECK-ERROR: instruction requires: fp8 sve2
125 // CHECK-UNKNOWN: 65083fff <unknown>
129 // F1CVTLT instructions
131 f1cvtlt z0.h, z0.b // 01100101-00001001-00110000-00000000
132 // CHECK-INST: f1cvtlt z0.h, z0.b
133 // CHECK-ENCODING: [0x00,0x30,0x09,0x65]
134 // CHECK-ERROR: instruction requires: fp8 sve2
135 // CHECK-UNKNOWN: 65093000 <unknown>
137 f1cvtlt z0.h, z31.b // 01100101-00001001-00110011-11100000
138 // CHECK-INST: f1cvtlt z0.h, z31.b
139 // CHECK-ENCODING: [0xe0,0x33,0x09,0x65]
140 // CHECK-ERROR: instruction requires: fp8 sve2
141 // CHECK-UNKNOWN: 650933e0 <unknown>
143 f1cvtlt z31.h, z0.b // 01100101-00001001-00110000-00011111
144 // CHECK-INST: f1cvtlt z31.h, z0.b
145 // CHECK-ENCODING: [0x1f,0x30,0x09,0x65]
146 // CHECK-ERROR: instruction requires: fp8 sve2
147 // CHECK-UNKNOWN: 6509301f <unknown>
149 f1cvtlt z31.h, z31.b // 01100101-00001001-00110011-11111111
150 // CHECK-INST: f1cvtlt z31.h, z31.b
151 // CHECK-ENCODING: [0xff,0x33,0x09,0x65]
152 // CHECK-ERROR: instruction requires: fp8 sve2
153 // CHECK-UNKNOWN: 650933ff <unknown>
157 // F2CVTLT instructions
159 f2cvtlt z0.h, z0.b // 01100101-00001001-00110100-00000000
160 // CHECK-INST: f2cvtlt z0.h, z0.b
161 // CHECK-ENCODING: [0x00,0x34,0x09,0x65]
162 // CHECK-ERROR: instruction requires: fp8 sve2
163 // CHECK-UNKNOWN: 65093400 <unknown>
165 f2cvtlt z0.h, z31.b // 01100101-00001001-00110111-11100000
166 // CHECK-INST: f2cvtlt z0.h, z31.b
167 // CHECK-ENCODING: [0xe0,0x37,0x09,0x65]
168 // CHECK-ERROR: instruction requires: fp8 sve2
169 // CHECK-UNKNOWN: 650937e0 <unknown>
171 f2cvtlt z31.h, z0.b // 01100101-00001001-00110100-00011111
172 // CHECK-INST: f2cvtlt z31.h, z0.b
173 // CHECK-ENCODING: [0x1f,0x34,0x09,0x65]
174 // CHECK-ERROR: instruction requires: fp8 sve2
175 // CHECK-UNKNOWN: 6509341f <unknown>
177 f2cvtlt z31.h, z31.b // 01100101-00001001-00110111-11111111
178 // CHECK-INST: f2cvtlt z31.h, z31.b
179 // CHECK-ENCODING: [0xff,0x37,0x09,0x65]
180 // CHECK-ERROR: instruction requires: fp8 sve2
181 // CHECK-UNKNOWN: 650937ff <unknown>
185 // BF1CVTLT instructions
187 bf1cvtlt z0.h, z0.b // 01100101-00001001-00111000-00000000
188 // CHECK-INST: bf1cvtlt z0.h, z0.b
189 // CHECK-ENCODING: [0x00,0x38,0x09,0x65]
190 // CHECK-ERROR: instruction requires: fp8 sve2
191 // CHECK-UNKNOWN: 65093800 <unknown>
193 bf1cvtlt z0.h, z31.b // 01100101-00001001-00111011-11100000
194 // CHECK-INST: bf1cvtlt z0.h, z31.b
195 // CHECK-ENCODING: [0xe0,0x3b,0x09,0x65]
196 // CHECK-ERROR: instruction requires: fp8 sve2
197 // CHECK-UNKNOWN: 65093be0 <unknown>
199 bf1cvtlt z31.h, z0.b // 01100101-00001001-00111000-00011111
200 // CHECK-INST: bf1cvtlt z31.h, z0.b
201 // CHECK-ENCODING: [0x1f,0x38,0x09,0x65]
202 // CHECK-ERROR: instruction requires: fp8 sve2
203 // CHECK-UNKNOWN: 6509381f <unknown>
205 bf1cvtlt z31.h, z31.b // 01100101-00001001-00111011-11111111
206 // CHECK-INST: bf1cvtlt z31.h, z31.b
207 // CHECK-ENCODING: [0xff,0x3b,0x09,0x65]
208 // CHECK-ERROR: instruction requires: fp8 sve2
209 // CHECK-UNKNOWN: 65093bff <unknown>
213 // BF2CVTLT instructions
215 bf2cvtlt z0.h, z0.b // 01100101-00001001-00111100-00000000
216 // CHECK-INST: bf2cvtlt z0.h, z0.b
217 // CHECK-ENCODING: [0x00,0x3c,0x09,0x65]
218 // CHECK-ERROR: instruction requires: fp8 sve2
219 // CHECK-UNKNOWN: 65093c00 <unknown>
221 bf2cvtlt z0.h, z31.b // 01100101-00001001-00111111-11100000
222 // CHECK-INST: bf2cvtlt z0.h, z31.b
223 // CHECK-ENCODING: [0xe0,0x3f,0x09,0x65]
224 // CHECK-ERROR: instruction requires: fp8 sve2
225 // CHECK-UNKNOWN: 65093fe0 <unknown>
227 bf2cvtlt z31.h, z0.b // 01100101-00001001-00111100-00011111
228 // CHECK-INST: bf2cvtlt z31.h, z0.b
229 // CHECK-ENCODING: [0x1f,0x3c,0x09,0x65]
230 // CHECK-ERROR: instruction requires: fp8 sve2
231 // CHECK-UNKNOWN: 65093c1f <unknown>
233 bf2cvtlt z31.h, z31.b // 01100101-00001001-00111111-11111111
234 // CHECK-INST: bf2cvtlt z31.h, z31.b
235 // CHECK-ENCODING: [0xff,0x3f,0x09,0x65]
236 // CHECK-ERROR: instruction requires: fp8 sve2
237 // CHECK-UNKNOWN: 65093fff <unknown>