[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / AArch64 / directive-arch_extension-negative.s
blob63da153c1a6ffcaf0437d8810fa05ff033ca482b
1 // RUN: not llvm-mc -triple aarch64 \
2 // RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm,+hbc,+mops \
3 // RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2,+ite,+cssc,+specres2,+gcs,+cmpbr \
4 // RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
6 .arch_extension axp64
7 // CHECK: error: unsupported architectural extension: axp64
8 // CHECK-NEXT: .arch_extension axp64
10 crc32cx w0, w1, x3
11 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: crc
12 .arch_extension nocrc
13 crc32cx w0, w1, x3
14 // CHECK: [[@LINE-1]]:1: error: instruction requires: crc
15 // CHECK-NEXT: crc32cx w0, w1, x3
17 sm4e v2.4s, v15.4s
18 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sm4
19 .arch_extension nosm4
20 sm4e v2.4s, v15.4s
21 // CHECK: [[@LINE-1]]:1: error: instruction requires: sm4
22 // CHECK-NEXT: sm4e v2.4s, v15.4s
24 sha512h q0, q1, v2.2d
25 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sha3
26 .arch_extension nosha3
27 sha512h q0, q1, v2.2d
28 // CHECK: [[@LINE-1]]:1: error: instruction requires: sha3
29 // CHECK-NEXT: sha512h q0, q1, v2.2d
31 sha1h s0, s1
32 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: sha2
33 .arch_extension nosha2
34 sha1h s0, s1
35 // CHECK: [[@LINE-1]]:1: error: instruction requires: sha2
36 // CHECK-NEXT: sha1h s0, s1
38 aese v0.16b, v1.16b
39 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: aes
40 .arch_extension noaes
41 aese v0.16b, v1.16b
42 // CHECK: [[@LINE-1]]:1: error: instruction requires: aes
43 // CHECK-NEXT: aese v0.16b, v1.16b
45 fminnm d0, d0, d1
46 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: fp
47 .arch_extension nofp
48 fminnm d0, d0, d1
49 // CHECK: [[@LINE-1]]:1: error: instruction requires: fp
50 // CHECK-NEXT: fminnm d0, d0, d1
52 // nofp implied nosimd, so reinstate it
53 .arch_extension simd
54 addp v0.4s, v0.4s, v0.4s
55 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: neon
56 .arch_extension nosimd
57 addp v0.4s, v0.4s, v0.4s
58 // CHECK: [[@LINE-1]]:1: error: instruction requires: neon
59 // CHECK-NEXT: addp v0.4s, v0.4s, v0.4s
61 esb
62 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ras
63 .arch_extension noras
64 esb
65 // CHECK: [[@LINE-1]]:1: error: instruction requires: ras
66 // CHECK-NEXT: esb
68 casa w5, w7, [x20]
69 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse
70 .arch_extension nolse
71 casa w5, w7, [x20]
72 // CHECK: [[@LINE-1]]:1: error: instruction requires: lse
73 // CHECK-NEXT: casa w5, w7, [x20]
75 // nolse implied nolse128, so reinstate it
76 .arch_extension lse128
77 swpp x0, x2, [x3]
78 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse128
79 .arch_extension nolse128
80 swpp x0, x2, [x3]
81 // CHECK: [[@LINE-1]]:1: error: instruction requires: lse128
82 // CHECK-NEXT: swpp x0, x2, [x3]
84 cfp rctx, x0
85 // CHECK-NOT: [[@LINE-1]]:5: error: CFPRCTX requires: predres
86 .arch_extension nopredres
87 cfp rctx, x0
88 // CHECK: [[@LINE-1]]:5: error: CFPRCTX requires: predres
89 // CHECK-NEXT: cfp rctx, x0
91 // nopredres implied nopredres2, so reinstate it
92 .arch_extension predres2
93 cosp rctx, x0
94 // CHECK-NOT: [[@LINE-1]]:6: error: COSP requires: predres2
95 .arch_extension nopredres2
96 cosp rctx, x0
97 // CHECK: [[@LINE-1]]:6: error: COSP requires: predres2
98 // CHECK-NEXT: cosp rctx, x0
100 dc cvadp, x7
101 // CHECK-NOT: [[@LINE-1]]:4: error: DC CVADP requires: ccdp
102 .arch_extension noccdp
103 dc cvadp, x7
104 // CHECK: [[@LINE-1]]:4: error: DC CVADP requires: ccdp
105 // CHECK-NEXT: dc cvadp, x7
107 irg x0, x1
108 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mte
109 .arch_extension nomte
110 irg x0, x1
111 // CHECK: [[@LINE-1]]:1: error: instruction requires: mte
112 // CHECK-NEXT: irg x0, x1
114 tlbi vmalle1os
115 // CHECK-NOT: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi
116 .arch_extension notlb-rmi
117 tlbi vmalle1os
118 // CHECK: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi
119 // CHECK-NEXT: tlbi vmalle1os
121 at s1e1wp, x2
122 // CHECK-NOT: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv
123 .arch_extension nopan-rwv
124 at s1e1wp, x2
125 // CHECK: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv
126 // CHECK-NEXT: at s1e1wp, x2
128 dc cvap, x7
129 // CHECK-NOT: [[@LINE-1]]:4: error: DC CVAP requires: ccpp
130 .arch_extension noccpp
131 dc cvap, x7
132 // CHECK: [[@LINE-1]]:4: error: DC CVAP requires: ccpp
133 // CHECK-NEXT: dc cvap, x7
135 ldapr x0, [x1]
136 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc
137 .arch_extension norcpc
138 ldapr x0, [x1]
139 // CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc
140 // CHECK-NEXT: ldapr x0, [x1]
142 // norcpc implied norcpc3, so reinstate it
143 .arch_extension rcpc3
144 stilp w24, w0, [x16, #-8]!
145 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc3
146 .arch_extension norcpc3
147 stilp w24, w0, [x16, #-8]!
148 // CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc3
149 // CHECK-NEXT: stilp w24, w0, [x16, #-8]!
151 ld64b x0, [x13]
152 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ls64
153 .arch_extension nols64
154 ld64b x0, [x13]
155 // CHECK: [[@LINE-1]]:1: error: instruction requires: ls64
156 // CHECK-NEXT: ld64b x0, [x13]
158 cfinv
159 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: flagm
160 .arch_extension noflagm
161 cfinv
162 // CHECK: [[@LINE-1]]:1: error: instruction requires: flagm
163 // CHECK-NEXT: cfinv
165 lbl:
166 bc.eq lbl
167 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: hbc
168 .arch_extension nohbc
169 bc.eq lbl
170 // CHECK: [[@LINE-1]]:1: error: instruction requires: hbc
171 // CHECK-NEXT: bc.eq lbl
173 cpyfp [x0]!, [x1]!, x2!
174 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mops
175 .arch_extension nomops
176 cpyfp [x0]!, [x1]!, x2!
177 // CHECK: [[@LINE-1]]:1: error: instruction requires: mops
178 // CHECK-NEXT: cpyfp [x0]!, [x1]!, x2!
180 // nolse128 implied nod128, so reinstate it
181 .arch_extension d128
182 // This needs to come before `.arch_extension nothe` as it uses an instruction
183 // that requires both the and d128
184 sysp #0, c2, c0, #0, x0, x1
185 rcwcasp x0, x1, x6, x7, [x4]
186 // CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128
187 // CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128
188 .arch_extension nod128
189 sysp #0, c2, c0, #0, x0, x1
190 rcwcasp x0, x1, x6, x7, [x4]
191 // CHECK: [[@LINE-2]]:1: error: instruction requires: d128
192 // CHECK-NEXT: sysp #0, c2, c0, #0, x0, x1
193 // CHECK: [[@LINE-3]]:1: error: instruction requires: d128
194 // CHECK-NEXT: rcwcasp x0, x1, x6, x7, [x4]
196 rcwswp x0, x1, [x2]
197 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: the
198 .arch_extension nothe
199 rcwswp x0, x1, [x2]
200 // CHECK: [[@LINE-1]]:1: error: instruction requires: the
201 // CHECK-NEXT: rcwswp x0, x1, [x2]
203 trcit x0
204 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ite
205 .arch_extension noite
206 trcit x0
207 // CHECK: [[@LINE-1]]:1: error: instruction requires: ite
208 // CHECK-NEXT: trcit x0
210 umax x0, x1, x2
211 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cssc
212 .arch_extension nocssc
213 umax x0, x1, x2
214 // CHECK: [[@LINE-1]]:1: error: instruction requires: cssc
215 // CHECK-NEXT: umax x0, x1, x2
217 // noras implied norasv2, so reinstate it
218 .arch_extension rasv2
219 mrs x0, ERXGSR_EL1
220 // CHECK-NOT: [[@LINE-1]]:9: error: expected readable system register
221 .arch_extension norasv2
222 mrs x0, ERXGSR_EL1
223 // CHECK: [[@LINE-1]]:9: error: expected readable system register
224 // CHECK-NEXT: mrs x0, ERXGSR_EL1
226 gcspushm x0
227 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: gcs
228 .arch_extension nogcs
229 gcspushm x0
230 // CHECK: [[@LINE-1]]:1: error: instruction requires: gcs
231 // CHECK-NEXT: gcspushm x0
233 cbhi x5, x5, #1020
234 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cmpbr
235 .arch_extension nocmpbr
236 cbhi x5, x5, #1020
237 // CHECK: [[@LINE-1]]:1: error: instruction requires: cmpbr
238 // CHECK-NEXT: cbhi x5, x5, #1020
241 .arch_extension fprcvt
242 .arch_extension nofprcvt
243 fcvtmu s0, d1
244 // CHECK: [[@LINE-1]]:1: error: instruction requires: fprcvt
245 // CHECK-NEXT: fcvtmu s0, d1
247 .arch_extension f8f16mm
248 .arch_extension nof8f16mm
249 fmmla v2.8h, v1.16b, v0.16b
250 // CHECK: [[@LINE-1]]:1: error: instruction requires: f8f16mm
251 // CHECK-NEXT: fmmla v2.8h, v1.16b, v0.16b
253 .arch_extension f8f32mm
254 .arch_extension nof8f32mm
255 fmmla v2.4s, v1.16b, v0.16b
256 // CHECK: [[@LINE-1]]:1: error: instruction requires: f8f32mm
257 // CHECK-NEXT: fmmla v2.4s, v1.16b, v0.16b