[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Hexagon / asmMap.s
blob4a2ca2499cc1729ae49f227832099e451fa4652d
1 #RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
3 # Make sure that the assembler mapped instructions are being handled correctly.
5 #CHECK: 3c56c000 { memw(r22+#0) = #0
6 memw(r22)=#0
8 #CHECK: 3c23e05f { memh(r3+#0) = #-33
9 memh(r3)=#-33
11 #CHECK: 3c07c012 { memb(r7+#0) = #18
12 memb(r7)=#18
14 #CHECK: 4101c008 { if (p0) r8 = memb(r1+#0)
15 if (p0) r8=memb(r1)
17 #CHECK: 4519d817 { if (!p3) r23 = memb(r25+#0)
18 if (!p3) r23=memb(r25)
20 #CHECK: 412dc002 { if (p0) r2 = memub(r13+#0)
21 if (p0) r2=memub(r13)
23 #CHECK: 453cc01a { if (!p0) r26 = memub(r28+#0)
24 if (!p0) r26=memub(r28)
26 #CHECK: 416bc818 { if (p1) r24 = memuh(r11+#0)
27 if (p1) r24=memuh(r11)
29 #CHECK: 457fc012 { if (!p0) r18 = memuh(r31+#0)
30 if (!p0) r18=memuh(r31)
32 #CHECK: 455dc014 { if (!p0) r20 = memh(r29+#0)
33 if (!p0) r20=memh(r29)
35 #CHECK: 415dc01d { if (p0) r29 = memh(r29+#0)
36 if (p0) r29=memh(r29)
38 #CHECK: 4583c01d { if (!p0) r29 = memw(r3+#0)
39 if (!p0) r29=memw(r3)
41 #CHECK: 419bd01e { if (p2) r30 = memw(r27+#0)
42 if (p2) r30=memw(r27)
44 #CHECK: 90e2c018 { r25:24 = membh(r2+#0)
45 r25:24=membh(r2)
47 #CHECK: 902bc006 { r6 = membh(r11+#0)
48 r6=membh(r11)
50 #CHECK: 90a2c01c { r29:28 = memubh(r2+#0)
51 r29:28=memubh(r2)
53 #CHECK: 906ec00d { r13 = memubh(r14+#0)
54 r13=memubh(r14)
56 #CHECK: 91dac00c { r13:12 = memd(r26+#0)
57 r13:12=memd(r26)
59 #CHECK: 919bc004 { r4 = memw(r27+#0)
60 r4=memw(r27)
62 #CHECK: 914cc005 { r5 = memh(r12+#0)
63 r5=memh(r12)
65 #CHECK: 9176c010 { r16 = memuh(r22+#0)
66 r16=memuh(r22)
68 #CHECK: 910bc017 { r23 = memb(r11+#0)
69 r23=memb(r11)
71 #CHECK: 912bc01b { r27 = memub(r11+#0)
72 r27=memub(r11)
74 #CHECK: 404ede01 { if (p1) memh(r14+#0) = r30
75 if (p1) memh(r14)=r30
77 #CHECK: 4449d900 { if (!p0) memh(r9+#0) = r25
78 if (!p0) memh(r9)=r25
80 #CHECK: 400ecd00 { if (p0) memb(r14+#0) = r13
81 if (p0) memb(r14)=r13
83 #CHECK: 440bcc01 { if (!p1) memb(r11+#0) = r12
84 if (!p1) memb(r11)=r12
86 #CHECK: 41d0d804 { if (p3) r5:4 = memd(r16+#0)
87 if (p3) r5:4=memd(r16)
89 #CHECK: 45d9c00c { if (!p0) r13:12 = memd(r25+#0)
90 if (!p0) r13:12=memd(r25)
92 #CHECK: 385ee06d { if (p3) memw(r30+#0) = #-19
93 if (p3) memw(r30)=#-19
95 #CHECK: 38c6c053 { if (!p2) memw(r6+#0) = #19
96 if (!p2) memw(r6)=#19
98 #CHECK: 381fc034 { if (p1) memb(r31+#0) = #20
99 if (p1) memb(r31)=#20
101 #CHECK: 389dc010 { if (!p0) memb(r29+#0) = #16
102 if (!p0) memb(r29)=#16
104 #CHECK: 3833e019 { if (p0) memh(r19+#0) = #-7
105 if (p0) memh(r19)=#-7
107 #CHECK: 38b7c013 { if (!p0) memh(r23+#0) = #19
108 if (!p0) memh(r23)=#19
110 #CHECK: 4488d401 { if (!p1) memw(r8+#0) = r20
111 if (!p1) memw(r8)=r20
113 #CHECK: 409ddc02 { if (p2) memw(r29+#0) = r28
114 if (p2) memw(r29)=r28
116 #CHECK: 446fc301 { if (!p1) memh(r15+#0) = r3.h
117 if (!p1) memh(r15)=r3.h
119 #CHECK: 406dc201 { if (p1) memh(r13+#0) = r2.h
120 if (p1) memh(r13)=r2.h
122 #CHECK: 40d9c601 { if (p1) memd(r25+#0) = r7:6
123 if (p1) memd(r25)=r7:6
125 #CHECK: 44dad803 { if (!p3) memd(r26+#0) = r25:24
126 if (!p3) memd(r26)=r25:24
128 #CHECK: 3e21c011 { memh(r1+#0) += r17
129 memh(r1)+=r17
131 #CHECK: 3e4fc019 { memw(r15+#0) += r25
132 memw(r15)+=r25
134 #CHECK: 3e5dc022 { memw(r29+#0) -= r2
135 memw(r29)-=r2
137 #CHECK: 3e04c004 { memb(r4+#0) += r4
138 memb(r4)+=r4
140 #CHECK: 3f53c016 { memw(r19+#0) += #22
141 memw(r19)+=#22
143 #CHECK: 3f24c01e { memh(r4+#0) += #30
144 memh(r4)+=#30
146 #CHECK: 3e27c02d { memh(r7+#0) -= r13
147 memh(r7)-=r13
149 #CHECK: 3e1ec032 { memb(r30+#0) -= r18
150 memb(r30)-=r18
152 #CHECK: 3e49c05b { memw(r9+#0) &= r27
153 memw(r9)&=r27
155 #CHECK: 3e2dc040 { memh(r13+#0) &= r0
156 memh(r13)&=r0
158 #CHECK: 3e05c046 { memb(r5+#0) &= r6
159 memb(r5)&=r6
161 #CHECK: 3e45c06a { memw(r5+#0) |= r10
162 memw(r5)|=r10
164 #CHECK: 3e21c07e { memh(r1+#0) |= r30
165 memh(r1)|=r30
167 #CHECK: 3e09c06f { memb(r9+#0) |= r15
168 memb(r9)|=r15
170 #CHECK: a157d100 { memh(r23+#0) = r17
171 memh(r23)=r17
173 #CHECK: a10fd400 { memb(r15+#0) = r20
174 memb(r15)=r20
176 #CHECK: 9082c014 { r21:20 = memb_fifo(r2+#0)
177 r21:20=memb_fifo(r2)
179 #CHECK: 9056c01c { r29:28 = memh_fifo(r22+#0)
180 r29:28=memh_fifo(r22)
182 #CHECK: a1d8ca00 { memd(r24+#0) = r11:10
183 memd(r24)=r11:10
185 #CHECK: a19ed900 { memw(r30+#0) = r25
186 memw(r30)=r25
188 #CHECK: a169ce00 { memh(r9+#0) = r14.h
189 memh(r9)=r14.h
191 #CHECK: 3f07c06b { memb(r7+#0) = setbit(#11)
192 memb(r7)=setbit(#11)
194 #CHECK: 3f34c07b { memh(r20+#0) = setbit(#27)
195 memh(r20)=setbit(#27)
197 #CHECK: 3f1cc032 { memb(r28+#0) -= #18
198 memb(r28)-=#18
200 #CHECK: 3f29c02a { memh(r9+#0) -= #10
201 memh(r9)-=#10
203 #CHECK: 3f4cc026 { memw(r12+#0) -= #6
204 memw(r12)-=#6
206 #CHECK: 3f00c00c { memb(r0+#0) += #12
207 memb(r0)+=#12
209 #CHECK: 3f50c07a { memw(r16+#0) = setbit(#26)
210 memw(r16)=setbit(#26)
212 #CHECK: 3f1fc05d { memb(r31+#0) = clrbit(#29)
213 memb(r31)=clrbit(#29)
215 #CHECK: 3f20c05e { memh(r0+#0) = clrbit(#30)
216 memh(r0)=clrbit(#30)
218 #CHECK: 3f42c059 { memw(r2+#0) = clrbit(#25)
219 memw(r2)=clrbit(#25)
221 #CHECK: 39cfe072 if (!p3.new) memw(r15+#0) = #-14
223 p3=cmp.eq(r5,##-1997506977)
224 if (!p3.new) memw(r15)=#-14
227 #CHECK: 3959e06b if (p3.new) memw(r25+#0) = #-21
229 p3=cmp.eq(r0,##1863618461)
230 if (p3.new) memw(r25)=#-21
233 #CHECK: 4312c801 if (p1.new) r1 = memb(r18+#0)
235 if (p1.new) r1=memb(r18)
236 p1=cmp.eq(r23,##-1105571618)
239 #CHECK: 4718d803 if (!p3.new) r3 = memb(r24+#0)
241 if (!p3.new) r3=memb(r24)
242 p3=cmp.eq(r3,##-210870878)
245 #CHECK: 4326c81b if (p1.new) r27 = memub(r6+#0)
247 if (p1.new) r27=memub(r6)
248 p1=cmp.eq(r29,##-188410493)
251 #CHECK: 473ad00d if (!p2.new) r13 = memub(r26+#0)
253 p2=cmp.eq(r30,##-1823852150)
254 if (!p2.new) r13=memub(r26)
257 #CHECK: 4785d80e if (!p3.new) r14 = memw(r5+#0)
259 if (!p3.new) r14=memw(r5)
260 p3=cmp.eq(r31,##-228524711)
263 #CHECK: 438cc81a if (p1.new) r26 = memw(r12+#0)
265 if (p1.new) r26=memw(r12)
266 p1=cmp.eq(r11,##-485232313)
269 #CHECK: 477dc019 if (!p0.new) r25 = memuh(r29+#0)
271 p0=cmp.eq(r23,##127565957)
272 if (!p0.new) r25=memuh(r29)
275 #CHECK: 4377c807 if (p1.new) r7 = memuh(r23+#0)
277 p1=cmp.eq(r30,##-222020054)
278 if (p1.new) r7=memuh(r23)
281 #CHECK: 4754c81c if (!p1.new) r28 = memh(r20+#0)
283 p1=cmp.eq(r18,##1159699785)
284 if (!p1.new) r28=memh(r20)
287 #CHECK: 435ec01b if (p0.new) r27 = memh(r30+#0)
289 p0=cmp.eq(r7,##-1114567705)
290 if (p0.new) r27=memh(r30)
293 #CHECK: 420dd100 if (p0.new) memb(r13+#0) = r17
295 p0=cmp.eq(r21,##-1458796638)
296 if (p0.new) memb(r13)=r17
299 #CHECK: 4601d602 if (!p2.new) memb(r1+#0) = r22
301 p2=cmp.eq(r20,##-824022439)
302 if (!p2.new) memb(r1)=r22
305 #CHECK: 43dcd808 if (p3.new) r9:8 = memd(r28+#0)
307 p3=cmp.eq(r13,##56660744)
308 if (p3.new) r9:8=memd(r28)
311 #CHECK: 47d8c80e if (!p1.new) r15:14 = memd(r24+#0)
313 if (!p1.new) r15:14=memd(r24)
314 p1=cmp.eq(r15,##1536716489)
317 #CHECK: 3918e045 if (p2.new) memb(r24+#0) = #-27
319 if (p2.new) memb(r24)=#-27
320 p2=cmp.eq(r21,##1741091811)
323 #CHECK: 398fe04d if (!p2.new) memb(r15+#0) = #-19
325 if (!p2.new) memb(r15)=#-19
326 p2=cmp.eq(r15,##779870261)
329 #CHECK: 3931c04b if (p2.new) memh(r17+#0) = #11
331 if (p2.new) memh(r17)=#11
332 p2=cmp.eq(r13,##-1171145798)
335 #CHECK: 39aee056 if (!p2.new) memh(r14+#0) = #-10
337 p2=cmp.eq(r23,##-633976762)
338 if (!p2.new) memh(r14)=#-10
341 #CHECK: 4692df01 if (!p1.new) memw(r18+#0) = r31
343 if (!p1.new) memw(r18)=r31
344 p1=cmp.eq(r11,##-319375732)
347 #CHECK: 428dc402 if (p2.new) memw(r13+#0) = r4
349 if (p2.new) memw(r13)=r4
350 p2=cmp.eq(r18,##1895120239)
353 #CHECK: 4670c300 if (!p0.new) memh(r16+#0) = r3.h
355 p0=cmp.eq(r25,##1348715015)
356 if (!p0.new) memh(r16)=r3.h
359 #CHECK: 426ddf02 if (p2.new) memh(r13+#0) = r31.h
361 p2=cmp.eq(r25,##1085560657)
362 if (p2.new) memh(r13)=r31.h
365 #CHECK: 464bcb01 if (!p1.new) memh(r11+#0) = r11
367 p1=cmp.eq(r10,##1491455911)
368 if (!p1.new) memh(r11)=r11
371 #CHECK: 4248d200 if (p0.new) memh(r8+#0) = r18
373 p0=cmp.eq(r3,##687581160)
374 if (p0.new) memh(r8)=r18
377 #CHECK: 42deca00 if (p0.new) memd(r30+#0) = r11:10
379 if (p0.new) memd(r30)=r11:10
380 p0=cmp.eq(r28,##562796189)
383 #CHECK: 46d5cc03 if (!p3.new) memd(r21+#0) = r13:12
385 if (!p3.new) memd(r21)=r13:12
386 p3=cmp.eq(r6,##-969273288)
389 #CHECK: 42bad201 if (p1.new) memw(r26+#0) = r22.new
391 if (p1.new) memw(r26)=r22.new
392 p1=cmp.eq(r0,##-1110065473)
393 r22=add(r28,r9)
396 #CHECK: 46b9d201 if (!p1.new) memw(r25+#0) = r26.new
398 p1=cmp.eq(r11,##-753121346)
399 r26=add(r19,r7)
400 if (!p1.new) memw(r25)=r26.new
403 #CHECK: 40aad200 if (p0) memw(r10+#0) = r6.new
405 r6=add(r30,r0)
406 if (p0) memw(r10)=r6.new
409 #CHECK: 44a6d202 if (!p2) memw(r6+#0) = r4.new
411 if (!p2) memw(r6)=r4.new
412 r4=add(r0,r3)
415 #CHECK: 40b9c200 if (p0) memb(r25+#0) = r29.new
417 if (p0) memb(r25)=r29.new
418 r29=add(r27,r30)
421 #CHECK: 44bec203 if (!p3) memb(r30+#0) = r8.new
423 if (!p3) memb(r30)=r8.new
424 r8=add(r24,r4)
427 #CHECK: 46aecc01 if (!p1.new) memh(r14+#0) = r13.new
429 if (!p1.new) memh(r14)=r13.new
430 r13=add(r21,r2)
431 p1=cmp.eq(r3,##-1529345886)
434 #CHECK: 42bcca02 if (p2.new) memh(r28+#0) = r18.new
436 p2=cmp.eq(r15,##2048545649)
437 if (p2.new) memh(r28)=r18.new
438 r18=add(r9,r3)
441 #CHECK: 46aac200 if (!p0.new) memb(r10+#0) = r30.new
443 p0=cmp.eq(r21,##-1160401822)
444 r30=add(r9,r22)
445 if (!p0.new) memb(r10)=r30.new
448 #CHECK: 42b8c202 if (p2.new) memb(r24+#0) = r11.new
450 if (p2.new) memb(r24)=r11.new
451 p2=cmp.eq(r30,##1267977346)
452 r11=add(r8,r18)
455 #CHECK: 44a3ca00 if (!p0) memh(r3+#0) = r28.new
457 r28=add(r16,r11)
458 if (!p0) memh(r3)=r28.new
461 #CHECK: 40abca03 if (p3) memh(r11+#0) = r24.new
463 if (p3) memh(r11)=r24.new
464 r24=add(r18,r19)
467 #CHECK: a1abd200 memw(r11+#0) = r5.new
469 memw(r11)=r5.new
470 r5=add(r0,r10)
473 #CHECK: a1a2ca00 memh(r2+#0) = r18.new
475 r18=add(r27,r18)
476 memh(r2)=r18.new
479 #CHECK: a1bac200 memb(r26+#0) = r15.new
481 r15=add(r22,r17)
482 memb(r26)=r15.new
485 #CHECK: d328ce1c { r29:28 = vsubub(r15:14,r9:8)
486 r29:28=vsubb(r15:14,r9:8)
488 #CHECK: 8c5ed60c { r12 = asr(r30,#22):rnd
489 r12=asrrnd(r30,#23)
491 #CHECK: ed1ec109 { r9 = mpyi(r30,r1)
492 r9=mpyui(r30,r1)
494 #CHECK: e010d787 { r7 = +mpyi(r16,#188)
495 r7=mpyi(r16,#188)
497 #CHECK: d206eea2 { p2 = boundscheck(r7:6,r15:14):raw:hi
498 p2=boundscheck(r7,r15:14)
500 #CHECK: f27ac102 { p2 = cmp.gtu(r26,r1)
501 p2=cmp.ltu(r1,r26)
503 #CHECK: f240df00 { p0 = cmp.gt(r0,r31)
504 p0=cmp.lt(r31,r0)
506 #CHECK: 7586cc01 { p1 = cmp.gtu(r6,#96)
507 p1=cmp.geu(r6,#97)
509 #CHECK: 755dc9a2 { p2 = cmp.gt(r29,#77)
510 p2=cmp.ge(r29,#78)
512 #CHECK: d310d60a { r11:10 = vaddub(r17:16,r23:22)
513 r11:10=vaddb(r17:16,r23:22)
515 #CHECK: 8753d1e6 { r6 = tableidxh(r19,#7,#17):raw
516 r6=tableidxh(r19,#7,#18)
518 #CHECK: 8786d277 { r23 = tableidxw(r6,#3,#18):raw
519 r23=tableidxw(r6,#3,#20)
521 #CHECK: 7c4dfff8 { r25:24 = combine(#-1,#-101)
522 r25:24=#-101
524 #CHECK: 8866c09a { r26 = vasrhub(r7:6,#0):raw
525 r26=vasrhub(r7:6,#1):rnd:sat
527 #CHECK: 7654c016 { r22 = sub(#0,r20)
528 r22=neg(r20)
530 #CHECK: 802cc808 { r9:8 = vasrh(r13:12,#8):raw
531 r9:8=vasrh(r13:12,#9):rnd
533 #CHECK: 7614dfe5 { r5 = {{zxtb\(r20\)|and\(r20,#255\)}}
534 r5=zxtb(r20)
536 #CHECK: 00ab68e2 immext(#179976320)
537 #CHECK: 7500c500 p0 = cmp.eq(r0,##179976360)
539 if (p0.new) r11=r26
540 p0=cmp.eq(r0,##179976360)
543 #CHECK: 74f9c00f { if (!p3) r15 = add(r25,#0)
544 if (!p3) r15=r25
546 #CHECK: 7425c005 { if (p1) r5 = add(r5,#0)
547 if (p1) r5=r5
549 #CHECK: e9badae2 { r2 = vrcmpys(r27:26,r27:26):<<1:rnd:sat:raw:lo
550 r2=vrcmpys(r27:26,r26):<<1:rnd:sat
552 #CHECK: fd13f20e if (p0.new) r15:14 = {{r19:18|combine\(r19,r18\)}}
554 p0=cmp.eq(r26,##1766934387)
555 if (p0.new) r15:14=r19:18
558 #CHECK: fd07c6c2 { if (!p2) r3:2 = {{r7:6|combine\(r7,r6\)}}
559 if (!p2) r3:2=r7:6
561 #CHECK: fd0dcc7e { if (p3) r31:30 = {{r13:12|combine\(r13,r12\)}}
562 if (p3) r31:30=r13:12
564 #CHECK: 748ae015 if (!p0.new) r21 = add(r10,#0)
566 p0=cmp.eq(r23,##805633208)
567 if (!p0.new) r21=r10
570 #CHECK: d36ec6c8 { r9:8 = add(r15:14,r7:6):raw:lo
571 r9:8=add(r14,r7:6)
573 #CHECK: 01e65477 immext(#509943232)
574 #CHECK: 7516c3a3 p3 = cmp.eq(r22,##509943261)
576 if (!p3.new) r9:8 = r25:24
577 p3=cmp.eq(r22,##509943261)
580 #CHECK: 87e0d5e5 { r5 = tableidxd(r0,#15,#21):raw
581 r5=tableidxd(r0,#15,#24)
583 #CHECK: 8701db65 { r5 = tableidxb(r1,#3,#27):raw
584 r5=tableidxb(r1,#3,#27)
586 #CHECK: 767affe3 { r3 = sub(#-1,r26)
587 r3=not(r26)
589 #CHECK: f51ddc06 { r7:6 = {{r29:28|combine\(r29,r28\)}}
590 r7:6=r29:28
592 #CHECK: 9406c000 { dcfetch(r6+#0)
593 dcfetch(r6)
595 #CHECK: 6b20c001 { p1 = or(p0,p0)
596 p1=p0
598 #CHECK: eafcdc82 { r3:2 += vrcmpys(r29:28,r29:28):<<1:sat:raw:lo
599 r3:2+=vrcmpys(r29:28,r28):<<1:sat
601 #CHECK: e8ead092 { r19:18 = vrcmpys(r11:10,r17:16):<<1:sat:raw:lo
602 r19:18=vrcmpys(r11:10,r16):<<1:sat
604 #CHECK: 9082c014 { r21:20 = memb_fifo(r2+#0)
605 r21:20=memb_fifo(r2)
607 #CHECK: 9056c01c { r29:28 = memh_fifo(r22+#0)
608 r29:28=memh_fifo(r22)