Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / directive-arch_extension-negative.s
blob1c1cfc9d33e3edc5f4d9563d66e78db5b1f7976f
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 \
4 // RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
6 .arch_extension axp64
7 // CHECK: error: unknown 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 addp v0.4s, v0.4s, v0.4s
53 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: neon
54 .arch_extension nosimd
55 addp v0.4s, v0.4s, v0.4s
56 // CHECK: [[@LINE-1]]:1: error: instruction requires: neon
57 // CHECK-NEXT: addp v0.4s, v0.4s, v0.4s
59 esb
60 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ras
61 .arch_extension noras
62 esb
63 // CHECK: [[@LINE-1]]:1: error: instruction requires: ras
64 // CHECK-NEXT: esb
66 casa w5, w7, [x20]
67 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse
68 .arch_extension nolse
69 casa w5, w7, [x20]
70 // CHECK: [[@LINE-1]]:1: error: instruction requires: lse
71 // CHECK-NEXT: casa w5, w7, [x20]
73 swpp x0, x2, [x3]
74 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse128
75 .arch_extension nolse128
76 swpp x0, x2, [x3]
77 // CHECK: [[@LINE-1]]:1: error: instruction requires: lse128
78 // CHECK-NEXT: swpp x0, x2, [x3]
80 cfp rctx, x0
81 // CHECK-NOT: [[@LINE-1]]:5: error: CFPRCTX requires: predres
82 .arch_extension nopredres
83 cfp rctx, x0
84 // CHECK: [[@LINE-1]]:5: error: CFPRCTX requires: predres
85 // CHECK-NEXT: cfp rctx, x0
87 cosp rctx, x0
88 // CHECK-NOT: [[@LINE-1]]:6: error: COSP requires: predres2
89 .arch_extension nopredres2
90 cosp rctx, x0
91 // CHECK: [[@LINE-1]]:6: error: COSP requires: predres2
92 // CHECK-NEXT: cosp rctx, x0
94 dc cvadp, x7
95 // CHECK-NOT: [[@LINE-1]]:4: error: DC CVADP requires: ccdp
96 .arch_extension noccdp
97 dc cvadp, x7
98 // CHECK: [[@LINE-1]]:4: error: DC CVADP requires: ccdp
99 // CHECK-NEXT: dc cvadp, x7
101 irg x0, x1
102 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mte
103 .arch_extension nomte
104 irg x0, x1
105 // CHECK: [[@LINE-1]]:1: error: instruction requires: mte
106 // CHECK-NEXT: irg x0, x1
108 tlbi vmalle1os
109 // CHECK-NOT: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi
110 .arch_extension notlb-rmi
111 tlbi vmalle1os
112 // CHECK: [[@LINE-1]]:6: error: TLBI VMALLE1OS requires: tlb-rmi
113 // CHECK-NEXT: tlbi vmalle1os
115 at s1e1wp, x2
116 // CHECK-NOT: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv
117 .arch_extension nopan-rwv
118 at s1e1wp, x2
119 // CHECK: [[@LINE-1]]:4: error: AT S1E1WP requires: pan-rwv
120 // CHECK-NEXT: at s1e1wp, x2
122 dc cvap, x7
123 // CHECK-NOT: [[@LINE-1]]:4: error: DC CVAP requires: ccpp
124 .arch_extension noccpp
125 dc cvap, x7
126 // CHECK: [[@LINE-1]]:4: error: DC CVAP requires: ccpp
127 // CHECK-NEXT: dc cvap, x7
129 ldapr x0, [x1]
130 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc
131 .arch_extension norcpc
132 ldapr x0, [x1]
133 // CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc
134 // CHECK-NEXT: ldapr x0, [x1]
136 stilp w24, w0, [x16, #-8]!
137 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc3
138 .arch_extension norcpc3
139 stilp w24, w0, [x16, #-8]!
140 // CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc3
141 // CHECK-NEXT: stilp w24, w0, [x16, #-8]!
143 ld64b x0, [x13]
144 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ls64
145 .arch_extension nols64
146 ld64b x0, [x13]
147 // CHECK: [[@LINE-1]]:1: error: instruction requires: ls64
148 // CHECK-NEXT: ld64b x0, [x13]
150 cfinv
151 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: flagm
152 .arch_extension noflagm
153 cfinv
154 // CHECK: [[@LINE-1]]:1: error: instruction requires: flagm
155 // CHECK-NEXT: cfinv
157 lbl:
158 bc.eq lbl
159 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: hbc
160 .arch_extension nohbc
161 bc.eq lbl
162 // CHECK: [[@LINE-1]]:1: error: instruction requires: hbc
163 // CHECK-NEXT: bc.eq lbl
165 cpyfp [x0]!, [x1]!, x2!
166 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mops
167 .arch_extension nomops
168 cpyfp [x0]!, [x1]!, x2!
169 // CHECK: [[@LINE-1]]:1: error: instruction requires: mops
170 // CHECK-NEXT: cpyfp [x0]!, [x1]!, x2!
172 // This needs to come before `.arch_extension nothe` as it uses an instruction
173 // that requires both the and d128
174 sysp #0, c2, c0, #0, x0, x1
175 rcwcasp x0, x1, x6, x7, [x4]
176 // CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128
177 // CHECK-NOT: [[@LINE-2]]:1: error: instruction requires: d128
178 .arch_extension nod128
179 sysp #0, c2, c0, #0, x0, x1
180 rcwcasp x0, x1, x6, x7, [x4]
181 // CHECK: [[@LINE-2]]:1: error: instruction requires: d128
182 // CHECK-NEXT: sysp #0, c2, c0, #0, x0, x1
183 // CHECK: [[@LINE-3]]:1: error: instruction requires: d128
184 // CHECK-NEXT: rcwcasp x0, x1, x6, x7, [x4]
186 rcwswp x0, x1, [x2]
187 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: the
188 .arch_extension nothe
189 rcwswp x0, x1, [x2]
190 // CHECK: [[@LINE-1]]:1: error: instruction requires: the
191 // CHECK-NEXT: rcwswp x0, x1, [x2]
193 trcit x0
194 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ite
195 .arch_extension noite
196 trcit x0
197 // CHECK: [[@LINE-1]]:1: error: instruction requires: ite
198 // CHECK-NEXT: trcit x0
200 umax x0, x1, x2
201 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cssc
202 .arch_extension nocssc
203 umax x0, x1, x2
204 // CHECK: [[@LINE-1]]:1: error: instruction requires: cssc
205 // CHECK-NEXT: umax x0, x1, x2
207 mrs x0, ERXGSR_EL1
208 // CHECK-NOT: [[@LINE-1]]:9: error: expected readable system register
209 .arch_extension norasv2
210 mrs x0, ERXGSR_EL1
211 // CHECK: [[@LINE-1]]:9: error: expected readable system register
212 // CHECK-NEXT: mrs x0, ERXGSR_EL1
214 gcspushm x0
215 // CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: gcs
216 .arch_extension nogcs
217 gcspushm x0
218 // CHECK: [[@LINE-1]]:1: error: instruction requires: gcs
219 // CHECK-NEXT: gcspushm x0