[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Hexagon / instructions / st.s
blob3c849a10c0b798faeadb48726b4e4e88a949c995
1 # RUN: llvm-mc -triple=hexagon -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s
2 # Hexagon Programmer's Reference Manual 11.8 ST
4 # Store doubleword
5 # CHECK: 9e f5 d1 3b
6 memd(r17 + r21<<#3) = r31:30
7 # CHECK: 28 d4 c0 48
8 memd(gp+#320) = r21:20
9 # CHECK: 02 40 00 00
10 # CHECK-NEXT: 28 d4 c0 48
11 memd(##168) = r21:20
12 memd(r17+#168) = r21:20
13 # CHECK: 02 f4 d1 a9
14 memd(r17 ++ I:circ(m1)) = r21:20
15 # CHECK: 28 f4 d1 a9
16 memd(r17 ++ #40:circ(m1)) = r21:20
17 # CHECK: 28 d4 d1 ab
18 memd(r17++#40) = r21:20
19 # CHECK: 00 40 00 00
20 # CHECK-NEXT: d5 fe d1 ad
21 memd(r17<<#3 + ##21) = r31:30
22 memd(r17++m1) = r21:20
23 # CHECK: 00 f4 d1 af
24 memd(r17 ++ m1:brev) = r21:20
26 # Store doubleword conditionally
27 # CHECK: fe f5 d1 34
28 if (p3) memd(r17+r21<<#3) = r31:30
29 # CHECK: fe f5 d1 35
30 if (!p3) memd(r17+r21<<#3) = r31:30
31 # CHECK: 03 40 45 85
32 # CHECK-NEXT: fe f5 d1 36
33 { p3 = r5
34 if (p3.new) memd(r17+r21<<#3) = r31:30 }
35 # CHECK: 03 40 45 85
36 # CHECK-NEXT: fe f5 d1 37
37 { p3 = r5
38 if (!p3.new) memd(r17+r21<<#3) = r31:30 }
39 # CHECK: ab de d1 40
40 if (p3) memd(r17+#168) = r31:30
41 # CHECK: ab de d1 44
42 if (!p3) memd(r17+#168) = r31:30
43 # CHECK: 03 40 45 85
44 # CHECK-NEXT: ab de d1 42
45 { p3 = r5
46 if (p3.new) memd(r17+#168) = r31:30 }
47 # CHECK: 03 40 45 85
48 # CHECK-NEXT: ab de d1 46
49 { p3 = r5
50 if (!p3.new) memd(r17+#168) = r31:30 }
51 # CHECK: 2b f4 d1 ab
52 if (p3) memd(r17++#40) = r21:20
53 # CHECK: 2f f4 d1 ab
54 if (!p3) memd(r17++#40) = r21:20
55 # CHECK: 03 40 45 85
56 # CHECK-NEXT: ab f4 d1 ab
57 { p3 = r5
58 if (p3.new) memd(r17++#40) = r21:20 }
59 # CHECK: 03 40 45 85
60 # CHECK-NEXT: af f4 d1 ab
61 { p3 = r5
62 if (!p3.new) memd(r17++#40) = r21:20 }
63 # CHECK: 02 40 00 00
64 # CHECK-NEXT: c3 d4 c2 af
65 if (p3) memd(##168) = r21:20
66 # CHECK: 02 40 00 00
67 # CHECK-NEXT: c7 d4 c2 af
68 if (!p3) memd(##168) = r21:20
69 # CHECK: 03 40 45 85
70 # CHECK-NEXT: 02 40 00 00
71 # CHECK-NEXT: c3 f4 c2 af
72 { p3 = r5
73 if (p3.new) memd(##168) = r21:20 }
74 # CHECK: 03 40 45 85
75 # CHECK-NEXT: 02 40 00 00
76 # CHECK-NEXT: c7 f4 c2 af
77 { p3 = r5
78 if (!p3.new) memd(##168) = r21:20 }
80 # Store byte
81 # CHECK: 9f f5 11 3b
82 memb(r17 + r21<<#3) = r31
83 # CHECK: 9f ca 11 3c
84 memb(r17+#21)=#31
85 # CHECK: 15 d5 00 48
86 memb(gp+#21) = r21
87 # CHECK: 00 40 00 00
88 # CHECK-NEXT: 15 d5 00 48
89 memb(##21) = r21
90 # CHECK: 15 d5 11 a1
91 memb(r17+#21) = r21
92 # CHECK: 02 f5 11 a9
93 memb(r17 ++ I:circ(m1)) = r21
94 # CHECK: 28 f5 11 a9
95 memb(r17 ++ #5:circ(m1)) = r21
96 # CHECK: 28 d5 11 ab
97 memb(r17++#5) = r21
98 # CHECK: 00 40 00 00
99 # CHECK-NEXT: d5 ff 11 ad
100 memb(r17<<#3 + ##21) = r31
101 # CHECK: 00 f5 11 ad
102 memb(r17++m1) = r21
103 # CHECK: 00 f5 11 af
104 memb(r17 ++ m1:brev) = r21
106 # Store byte conditionally
107 # CHECK: ff f5 11 34
108 if (p3) memb(r17+r21<<#3) = r31
109 # CHECK: ff f5 11 35
110 if (!p3) memb(r17+r21<<#3) = r31
111 # CHECK: 03 40 45 85
112 # CHECK-NEXT: ff f5 11 36
113 { p3 = r5
114 if (p3.new) memb(r17+r21<<#3) = r31 }
115 # CHECK: 03 40 45 85
116 # CHECK-NEXT: ff f5 11 37
117 { p3 = r5
118 if (!p3.new) memb(r17+r21<<#3) = r31 }
119 # CHECK: ff ca 11 38
120 if (p3) memb(r17+#21)=#31
121 # CHECK: ff ca 91 38
122 if (!p3) memb(r17+#21)=#31
123 # CHECK: 03 40 45 85
124 # CHECK-NEXT: ff ca 11 39
125 { p3 = r5
126 if (p3.new) memb(r17+#21)=#31 }
127 # CHECK: 03 40 45 85
128 # CHECK-NEXT: ff ca 91 39
129 { p3 = r5
130 if (!p3.new) memb(r17+#21)=#31 }
131 # CHECK: ab df 11 40
132 if (p3) memb(r17+#21) = r31
133 # CHECK: ab df 11 44
134 if (!p3) memb(r17+#21) = r31
135 # CHECK: 03 40 45 85
136 # CHECK-NEXT: ab df 11 42
137 { p3 = r5
138 if (p3.new) memb(r17+#21) = r31 }
139 # CHECK: 03 40 45 85
140 # CHECK-NEXT: ab df 11 46
141 { p3 = r5
142 if (!p3.new) memb(r17+#21) = r31 }
143 # CHECK: 2b f5 11 ab
144 if (p3) memb(r17++#5) = r21
145 # CHECK: 2f f5 11 ab
146 if (!p3) memb(r17++#5) = r21
147 # CHECK: 03 40 45 85
148 # CHECK-NEXT: ab f5 11 ab
149 { p3 = r5
150 if (p3.new) memb(r17++#5) = r21 }
151 # CHECK: 03 40 45 85
152 # CHECK-NEXT: af f5 11 ab
153 { p3 = r5
154 if (!p3.new) memb(r17++#5) = r21 }
155 # CHECK: 00 40 00 00
156 # CHECK-NEXT: ab d5 01 af
157 if (p3) memb(##21) = r21
158 # CHECK: 00 40 00 00
159 # CHECK-NEXT: af d5 01 af
160 if (!p3) memb(##21) = r21
161 # CHECK: 03 40 45 85
162 # CHECK-NEXT: 00 40 00 00
163 # CHECK-NEXT: ab f5 01 af
164 { p3 = r5
165 if (p3.new) memb(##21) = r21 }
166 # CHECK: 03 40 45 85
167 # CHECK-NEXT: 00 40 00 00
168 # CHECK-NEXT: af f5 01 af
169 { p3 = r5
170 if (!p3.new) memb(##21) = r21 }
172 # Store halfword
173 # CHECK: 9f f5 51 3b
174 memh(r17 + r21<<#3) = r31
175 # CHECK: 9f f5 71 3b
176 memh(r17 + r21<<#3) = r31.h
177 # CHECK: 95 cf 31 3c
178 memh(r17+#62)=#21
179 # CHECK: 00 40 00 00
180 # CHECK-NEXT: 2a d5 40 48
181 memh(##42) = r21
182 # CHECK: 00 40 00 00
183 # CHECK-NEXT: 2a d5 60 48
184 memh(##42) = r21.h
185 # CHECK: 2a d5 40 48
186 memh(gp+#84) = r21
187 # CHECK: 2a d5 60 48
188 memh(gp+#84) = r21.h
189 # CHECK: 15 df 51 a1
190 memh(r17+#42) = r31
191 # CHECK: 15 df 71 a1
192 memh(r17+#42) = r31.h
193 # CHECK: 02 f5 51 a9
194 memh(r17 ++ I:circ(m1)) = r21
195 # CHECK: 28 f5 51 a9
196 memh(r17 ++ #10:circ(m1)) = r21
197 # CHECK: 02 f5 71 a9
198 memh(r17 ++ I:circ(m1)) = r21.h
199 # CHECK: 28 f5 71 a9
200 memh(r17 ++ #10:circ(m1)) = r21.h
201 # CHECK: 28 d5 51 ab
202 memh(r17++#10) = r21
203 # CHECK: 00 40 00 00
204 # CHECK-NEXT: d5 ff 51 ad
205 memh(r17<<#3 + ##21) = r31
206 # CHECK: 28 d5 71 ab
207 memh(r17++#10) = r21.h
208 # CHECK: 00 40 00 00
209 # CHECK-NEXT: d5 ff 71 ad
210 memh(r17<<#3 + ##21) = r31.h
211 # CHECK: 00 f5 51 ad
212 memh(r17++m1) = r21
213 # CHECK: 00 f5 71 ad
214 memh(r17++m1) = r21.h
215 # CHECK: 00 f5 51 af
216 memh(r17 ++ m1:brev) = r21
217 # CHECK: 00 f5 71 af
218 memh(r17 ++ m1:brev) = r21.h
220 # Store halfword conditionally
221 # CHECK: ff f5 51 34
222 if (p3) memh(r17+r21<<#3) = r31
223 # CHECK: ff f5 71 34
224 if (p3) memh(r17+r21<<#3) = r31.h
225 # CHECK: ff f5 51 35
226 if (!p3) memh(r17+r21<<#3) = r31
227 # CHECK: ff f5 71 35
228 if (!p3) memh(r17+r21<<#3) = r31.h
229 # CHECK: 03 40 45 85
230 # CHECK-NEXT: ff f5 51 36
231 { p3 = r5
232 if (p3.new) memh(r17+r21<<#3) = r31 }
233 # CHECK: 03 40 45 85
234 # CHECK-NEXT: ff f5 71 36
235 { p3 = r5
236 if (p3.new) memh(r17+r21<<#3) = r31.h }
237 # CHECK: 03 40 45 85
238 # CHECK-NEXT: ff f5 51 37
239 { p3 = r5
240 if (!p3.new) memh(r17+r21<<#3) = r31 }
241 # CHECK: 03 40 45 85
242 # CHECK-NEXT: ff f5 71 37
243 { p3 = r5
244 if (!p3.new) memh(r17+r21<<#3) = r31.h }
245 # CHECK: f5 cf 31 38
246 if (p3) memh(r17+#62)=#21
247 # CHECK: f5 cf b1 38
248 if (!p3) memh(r17+#62)=#21
249 # CHECK: 03 40 45 85
250 # CHECK-NEXT: f5 cf 31 39
251 { p3 = r5
252 if (p3.new) memh(r17+#62)=#21 }
253 # CHECK: 03 40 45 85
254 # CHECK-NEXT: f5 cf b1 39
255 { p3 = r5
256 if (!p3.new) memh(r17+#62)=#21 }
257 # CHECK: fb d5 51 40
258 if (p3) memh(r17+#62) = r21
259 # CHECK: fb d5 71 40
260 if (p3) memh(r17+#62) = r21.h
261 # CHECK: fb d5 51 44
262 if (!p3) memh(r17+#62) = r21
263 # CHECK: fb d5 71 44
264 if (!p3) memh(r17+#62) = r21.h
265 # CHECK: 03 40 45 85
266 # CHECK-NEXT: fb d5 51 42
267 { p3 = r5
268 if (p3.new) memh(r17+#62) = r21 }
269 # CHECK: 03 40 45 85
270 # CHECK-NEXT: fb d5 71 42
271 { p3 = r5
272 if (p3.new) memh(r17+#62) = r21.h }
273 # CHECK: 03 40 45 85
274 # CHECK-NEXT: fb d5 51 46
275 { p3 = r5
276 if (!p3.new) memh(r17+#62) = r21 }
277 # CHECK: 03 40 45 85
278 # CHECK-NEXT: fb d5 71 46
279 { p3 = r5
280 if (!p3.new) memh(r17+#62) = r21.h }
281 # CHECK: 2b f5 51 ab
282 if (p3) memh(r17++#10) = r21
283 # CHECK: 2f f5 51 ab
284 if (!p3) memh(r17++#10) = r21
285 # CHECK: 03 40 45 85
286 # CHECK-NEXT: ab f5 51 ab
287 { p3 = r5
288 if (p3.new) memh(r17++#10) = r21 }
289 # CHECK: 03 40 45 85
290 # CHECK-NEXT: af f5 51 ab
291 { p3 = r5
292 if (!p3.new) memh(r17++#10) = r21 }
293 # CHECK: 2b f5 71 ab
294 if (p3) memh(r17++#10) = r21.h
295 # CHECK: 2f f5 71 ab
296 if (!p3) memh(r17++#10) = r21.h
297 # CHECK: 03 40 45 85
298 # CHECK-NEXT: ab f5 71 ab
299 { p3 = r5
300 if (p3.new) memh(r17++#10) = r21.h }
301 # CHECK: 03 40 45 85
302 # CHECK-NEXT: af f5 71 ab
303 { p3 = r5
304 if (!p3.new) memh(r17++#10) = r21.h }
305 # CHECK: 00 40 00 00
306 # CHECK-NEXT: d3 d5 42 af
307 if (p3) memh(##42) = r21
308 # CHECK: 00 40 00 00
309 # CHECK-NEXT: d3 d5 62 af
310 if (p3) memh(##42) = r21.h
311 # CHECK: 00 40 00 00
312 # CHECK-NEXT: d7 d5 42 af
313 if (!p3) memh(##42) = r21
314 # CHECK: 00 40 00 00
315 # CHECK-NEXT: d7 d5 62 af
316 if (!p3) memh(##42) = r21.h
317 # CHECK: 03 40 45 85
318 # CHECK-NEXT: 00 40 00 00
319 # CHECK-NEXT: d3 f5 42 af
320 { p3 = r5
321 if (p3.new) memh(##42) = r21 }
322 # CHECK: 03 40 45 85
323 # CHECK-NEXT: 00 40 00 00
324 # CHECK-NEXT: d3 f5 62 af
325 { p3 = r5
326 if (p3.new) memh(##42) = r21.h }
327 # CHECK: 03 40 45 85
328 # CHECK-NEXT: 00 40 00 00
329 # CHECK-NEXT: d7 f5 42 af
330 { p3 = r5
331 if (!p3.new) memh(##42) = r21 }
332 # CHECK: 03 40 45 85
333 # CHECK-NEXT: 00 40 00 00
334 # CHECK-NEXT: d7 f5 62 af
335 { p3 = r5
336 if (!p3.new) memh(##42) = r21.h }
338 # Store word
339 # CHECK: 9f f5 91 3b
340 memw(r17 + r21<<#3) = r31
341 # CHECK: 9f ca 51 3c
342 memw(r17+#84)=#31
343 # CHECK: 15 df 80 48
344 memw(gp+#84) = r31
345 # CHECK: 01 40 00 00
346 # CHECK-NEXT: 14 d5 80 48
347 memw(##84) = r21
348 # CHECK: 9f ca 51 3c
349 memw(r17+#84)=#31
350 # CHECK: 15 df 91 a1
351 memw(r17+#84) = r31
352 # CHECK: 02 f5 91 a9
353 memw(r17 ++ I:circ(m1)) = r21
354 # CHECK: 28 f5 91 a9
355 memw(r17 ++ #20:circ(m1)) = r21
356 # CHECK: 28 d5 91 ab
357 memw(r17++#20) = r21
358 # CHECK: 00 40 00 00
359 # CHECK-NEXT: d5 ff 91 ad
360 memw(r17<<#3 + ##21) = r31
361 # CHECK: 00 f5 91 ad
362 memw(r17++m1) = r21
363 # CHECK: 00 f5 91 af
364 memw(r17 ++ m1:brev) = r21
366 # Store word conditionally
367 # CHECK: ff f5 91 34
368 if (p3) memw(r17+r21<<#3) = r31
369 # CHECK: ff f5 91 35
370 if (!p3) memw(r17+r21<<#3) = r31
371 # CHECK: 03 40 45 85
372 # CHECK-NEXT: ff f5 91 36
373 { p3 = r5
374 if (p3.new) memw(r17+r21<<#3) = r31 }
375 # CHECK: 03 40 45 85
376 # CHECK-NEXT: ff f5 91 37
377 { p3 = r5
378 if (!p3.new) memw(r17+r21<<#3) = r31 }
379 # CHECK: ff ca 51 38
380 if (p3) memw(r17+#84)=#31
381 # CHECK: ff ca d1 38
382 if (!p3) memw(r17+#84)=#31
383 # CHECK: 03 40 45 85
384 # CHECK-NEXT: ff ca 51 39
385 { p3 = r5
386 if (p3.new) memw(r17+#84)=#31 }
387 # CHECK: 03 40 45 85
388 # CHECK-NEXT: ff ca d1 39
389 { p3 = r5
390 if (!p3.new) memw(r17+#84)=#31 }
391 # CHECK: ab df 91 40
392 if (p3) memw(r17+#84) = r31
393 # CHECK: ab df 91 44
394 if (!p3) memw(r17+#84) = r31
395 # CHECK: 03 40 45 85
396 # CHECK-NEXT: ab df 91 42
397 { p3 = r5
398 if (p3.new) memw(r17+#84) = r31 }
399 # CHECK: 03 40 45 85
400 # CHECK-NEXT: ab df 91 46
401 { p3 = r5
402 if (!p3.new) memw(r17+#84) = r31 }
403 # CHECK: 2b f5 91 ab
404 if (p3) memw(r17++#20) = r21
405 # CHECK: 2f f5 91 ab
406 if (!p3) memw(r17++#20) = r21
407 # CHECK: 03 40 45 85
408 # CHECK-NEXT: af f5 91 ab
409 { p3 = r5
410 if (!p3.new) memw(r17++#20) = r21 }
411 # CHECK: 03 40 45 85
412 # CHECK-NEXT: ab f5 91 ab
413 { p3 = r5
414 if (p3.new) memw(r17++#20) = r21 }
415 # CHECK: 01 40 00 00
416 # CHECK-NEXT: a3 d5 81 af
417 if (p3) memw(##84) = r21
418 # CHECK: 01 40 00 00
419 # CHECK-NEXT: a7 d5 81 af
420 if (!p3) memw(##84) = r21
421 # CHECK: 03 40 45 85
422 # CHECK-NEXT: 01 40 00 00
423 # CHECK-NEXT: a3 f5 81 af
424 { p3 = r5
425 if (p3.new) memw(##84) = r21 }
426 # CHECK: 03 40 45 85
427 # CHECK-NEXT: 01 40 00 00
428 # CHECK-NEXT: a7 f5 81 af
429 { p3 = r5
430 if (!p3.new) memw(##84) = r21 }
432 # Allocate stack frame
433 # CHECK: 1f c0 9d a0
434 allocframe(#248)