Lines Matching refs:VI
3 …cpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck --check-prefixes=GCN,VI %s
18 ; VI-LABEL: bfe_u32_arg_arg_arg:
19 ; VI: ; %bb.0:
20 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
21 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2c
22 ; VI-NEXT: s_mov_b32 s7, 0xf000
23 ; VI-NEXT: s_mov_b32 s6, -1
24 ; VI-NEXT: s_waitcnt lgkmcnt(0)
25 ; VI-NEXT: v_mov_b32_e32 v0, s0
26 ; VI-NEXT: v_bfe_u32 v0, v0, s1, s1
27 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
28 ; VI-NEXT: s_endpgm
48 ; VI-LABEL: bfe_u32_arg_arg_imm:
49 ; VI: ; %bb.0:
50 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
51 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2c
52 ; VI-NEXT: v_mov_b32_e32 v1, 0x7b
53 ; VI-NEXT: s_mov_b32 s7, 0xf000
54 ; VI-NEXT: s_mov_b32 s6, -1
55 ; VI-NEXT: s_waitcnt lgkmcnt(0)
56 ; VI-NEXT: v_mov_b32_e32 v0, s1
57 ; VI-NEXT: v_bfe_u32 v0, s0, v0, v1
58 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
59 ; VI-NEXT: s_endpgm
79 ; VI-LABEL: bfe_u32_arg_imm_arg:
80 ; VI: ; %bb.0:
81 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
82 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2c
83 ; VI-NEXT: v_mov_b32_e32 v0, 0x7b
84 ; VI-NEXT: s_mov_b32 s7, 0xf000
85 ; VI-NEXT: s_mov_b32 s6, -1
86 ; VI-NEXT: s_waitcnt lgkmcnt(0)
87 ; VI-NEXT: v_mov_b32_e32 v1, s1
88 ; VI-NEXT: v_bfe_u32 v0, s0, v0, v1
89 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
90 ; VI-NEXT: s_endpgm
111 ; VI-LABEL: bfe_u32_imm_arg_arg:
112 ; VI: ; %bb.0:
113 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
114 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2c
115 ; VI-NEXT: s_movk_i32 s2, 0x7b
116 ; VI-NEXT: s_mov_b32 s7, 0xf000
117 ; VI-NEXT: s_mov_b32 s6, -1
118 ; VI-NEXT: s_waitcnt lgkmcnt(0)
119 ; VI-NEXT: v_mov_b32_e32 v0, s0
120 ; VI-NEXT: v_mov_b32_e32 v1, s1
121 ; VI-NEXT: v_bfe_u32 v0, s2, v0, v1
122 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
123 ; VI-NEXT: s_endpgm
140 ; VI-LABEL: bfe_u32_arg_0_width_reg_offset:
141 ; VI: ; %bb.0:
142 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
143 ; VI-NEXT: s_mov_b32 s3, 0xf000
144 ; VI-NEXT: s_mov_b32 s2, -1
145 ; VI-NEXT: v_mov_b32_e32 v0, 0
146 ; VI-NEXT: s_waitcnt lgkmcnt(0)
147 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
148 ; VI-NEXT: s_endpgm
165 ; VI-LABEL: bfe_u32_arg_0_width_imm_offset:
166 ; VI: ; %bb.0:
167 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
168 ; VI-NEXT: s_mov_b32 s3, 0xf000
169 ; VI-NEXT: s_mov_b32 s2, -1
170 ; VI-NEXT: v_mov_b32_e32 v0, 0
171 ; VI-NEXT: s_waitcnt lgkmcnt(0)
172 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
173 ; VI-NEXT: s_endpgm
197 ; VI-LABEL: bfe_u32_zextload_i8:
198 ; VI: ; %bb.0:
199 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
200 ; VI-NEXT: s_mov_b32 s3, 0xf000
201 ; VI-NEXT: s_mov_b32 s2, -1
202 ; VI-NEXT: s_waitcnt lgkmcnt(0)
203 ; VI-NEXT: s_mov_b32 s0, s4
204 ; VI-NEXT: s_mov_b32 s1, s5
205 ; VI-NEXT: s_mov_b32 s4, s6
206 ; VI-NEXT: s_mov_b32 s5, s7
207 ; VI-NEXT: s_mov_b32 s6, s2
208 ; VI-NEXT: s_mov_b32 s7, s3
209 ; VI-NEXT: buffer_load_ubyte v0, off, s[4:7], 0
210 ; VI-NEXT: s_waitcnt vmcnt(0)
211 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
212 ; VI-NEXT: s_endpgm
241 ; VI-LABEL: bfe_u32_zext_in_reg_i8:
242 ; VI: ; %bb.0:
243 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
244 ; VI-NEXT: s_mov_b32 s3, 0xf000
245 ; VI-NEXT: s_mov_b32 s2, -1
246 ; VI-NEXT: s_waitcnt lgkmcnt(0)
247 ; VI-NEXT: s_mov_b32 s0, s4
248 ; VI-NEXT: s_mov_b32 s1, s5
249 ; VI-NEXT: s_mov_b32 s4, s6
250 ; VI-NEXT: s_mov_b32 s5, s7
251 ; VI-NEXT: s_mov_b32 s6, s2
252 ; VI-NEXT: s_mov_b32 s7, s3
253 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
254 ; VI-NEXT: s_waitcnt vmcnt(0)
255 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
256 ; VI-NEXT: v_and_b32_e32 v0, 0xff, v0
257 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
258 ; VI-NEXT: s_endpgm
287 ; VI-LABEL: bfe_u32_zext_in_reg_i16:
288 ; VI: ; %bb.0:
289 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
290 ; VI-NEXT: s_mov_b32 s3, 0xf000
291 ; VI-NEXT: s_mov_b32 s2, -1
292 ; VI-NEXT: s_waitcnt lgkmcnt(0)
293 ; VI-NEXT: s_mov_b32 s0, s4
294 ; VI-NEXT: s_mov_b32 s1, s5
295 ; VI-NEXT: s_mov_b32 s4, s6
296 ; VI-NEXT: s_mov_b32 s5, s7
297 ; VI-NEXT: s_mov_b32 s6, s2
298 ; VI-NEXT: s_mov_b32 s7, s3
299 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
300 ; VI-NEXT: s_waitcnt vmcnt(0)
301 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
302 ; VI-NEXT: v_and_b32_e32 v0, 0xffff, v0
303 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
304 ; VI-NEXT: s_endpgm
334 ; VI-LABEL: bfe_u32_zext_in_reg_i8_offset_1:
335 ; VI: ; %bb.0:
336 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
337 ; VI-NEXT: s_mov_b32 s3, 0xf000
338 ; VI-NEXT: s_mov_b32 s2, -1
339 ; VI-NEXT: s_waitcnt lgkmcnt(0)
340 ; VI-NEXT: s_mov_b32 s0, s4
341 ; VI-NEXT: s_mov_b32 s1, s5
342 ; VI-NEXT: s_mov_b32 s4, s6
343 ; VI-NEXT: s_mov_b32 s5, s7
344 ; VI-NEXT: s_mov_b32 s6, s2
345 ; VI-NEXT: s_mov_b32 s7, s3
346 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
347 ; VI-NEXT: s_waitcnt vmcnt(0)
348 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
349 ; VI-NEXT: v_and_b32_e32 v0, 0xfe, v0
350 ; VI-NEXT: v_bfe_u32 v0, v0, 1, 8
351 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
352 ; VI-NEXT: s_endpgm
382 ; VI-LABEL: bfe_u32_zext_in_reg_i8_offset_3:
383 ; VI: ; %bb.0:
384 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
385 ; VI-NEXT: s_mov_b32 s3, 0xf000
386 ; VI-NEXT: s_mov_b32 s2, -1
387 ; VI-NEXT: s_waitcnt lgkmcnt(0)
388 ; VI-NEXT: s_mov_b32 s0, s4
389 ; VI-NEXT: s_mov_b32 s1, s5
390 ; VI-NEXT: s_mov_b32 s4, s6
391 ; VI-NEXT: s_mov_b32 s5, s7
392 ; VI-NEXT: s_mov_b32 s6, s2
393 ; VI-NEXT: s_mov_b32 s7, s3
394 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
395 ; VI-NEXT: s_waitcnt vmcnt(0)
396 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
397 ; VI-NEXT: v_and_b32_e32 v0, 0xf8, v0
398 ; VI-NEXT: v_bfe_u32 v0, v0, 3, 8
399 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
400 ; VI-NEXT: s_endpgm
430 ; VI-LABEL: bfe_u32_zext_in_reg_i8_offset_7:
431 ; VI: ; %bb.0:
432 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
433 ; VI-NEXT: s_mov_b32 s3, 0xf000
434 ; VI-NEXT: s_mov_b32 s2, -1
435 ; VI-NEXT: s_waitcnt lgkmcnt(0)
436 ; VI-NEXT: s_mov_b32 s0, s4
437 ; VI-NEXT: s_mov_b32 s1, s5
438 ; VI-NEXT: s_mov_b32 s4, s6
439 ; VI-NEXT: s_mov_b32 s5, s7
440 ; VI-NEXT: s_mov_b32 s6, s2
441 ; VI-NEXT: s_mov_b32 s7, s3
442 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
443 ; VI-NEXT: s_waitcnt vmcnt(0)
444 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
445 ; VI-NEXT: v_and_b32_e32 v0, 0x80, v0
446 ; VI-NEXT: v_bfe_u32 v0, v0, 7, 8
447 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
448 ; VI-NEXT: s_endpgm
477 ; VI-LABEL: bfe_u32_zext_in_reg_i16_offset_8:
478 ; VI: ; %bb.0:
479 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
480 ; VI-NEXT: s_mov_b32 s3, 0xf000
481 ; VI-NEXT: s_mov_b32 s2, -1
482 ; VI-NEXT: s_waitcnt lgkmcnt(0)
483 ; VI-NEXT: s_mov_b32 s0, s4
484 ; VI-NEXT: s_mov_b32 s1, s5
485 ; VI-NEXT: s_mov_b32 s4, s6
486 ; VI-NEXT: s_mov_b32 s5, s7
487 ; VI-NEXT: s_mov_b32 s6, s2
488 ; VI-NEXT: s_mov_b32 s7, s3
489 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
490 ; VI-NEXT: s_waitcnt vmcnt(0)
491 ; VI-NEXT: v_add_u32_e32 v0, vcc, 1, v0
492 ; VI-NEXT: v_bfe_u32 v0, v0, 8, 8
493 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
494 ; VI-NEXT: s_endpgm
522 ; VI-LABEL: bfe_u32_test_1:
523 ; VI: ; %bb.0:
524 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
525 ; VI-NEXT: s_mov_b32 s3, 0xf000
526 ; VI-NEXT: s_mov_b32 s2, -1
527 ; VI-NEXT: s_waitcnt lgkmcnt(0)
528 ; VI-NEXT: s_mov_b32 s0, s4
529 ; VI-NEXT: s_mov_b32 s1, s5
530 ; VI-NEXT: s_mov_b32 s4, s6
531 ; VI-NEXT: s_mov_b32 s5, s7
532 ; VI-NEXT: s_mov_b32 s6, s2
533 ; VI-NEXT: s_mov_b32 s7, s3
534 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
535 ; VI-NEXT: s_waitcnt vmcnt(0)
536 ; VI-NEXT: v_and_b32_e32 v0, 1, v0
537 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
538 ; VI-NEXT: s_endpgm
556 ; VI-LABEL: bfe_u32_test_2:
557 ; VI: ; %bb.0:
558 ; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
559 ; VI-NEXT: s_waitcnt lgkmcnt(0)
560 ; VI-NEXT: s_mov_b32 s3, 0xf000
561 ; VI-NEXT: s_mov_b32 s2, -1
562 ; VI-NEXT: v_mov_b32_e32 v0, 0
563 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
564 ; VI-NEXT: s_endpgm
583 ; VI-LABEL: bfe_u32_test_3:
584 ; VI: ; %bb.0:
585 ; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
586 ; VI-NEXT: s_waitcnt lgkmcnt(0)
587 ; VI-NEXT: s_mov_b32 s3, 0xf000
588 ; VI-NEXT: s_mov_b32 s2, -1
589 ; VI-NEXT: v_mov_b32_e32 v0, 0
590 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
591 ; VI-NEXT: s_endpgm
610 ; VI-LABEL: bfe_u32_test_4:
611 ; VI: ; %bb.0:
612 ; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
613 ; VI-NEXT: s_waitcnt lgkmcnt(0)
614 ; VI-NEXT: s_mov_b32 s3, 0xf000
615 ; VI-NEXT: s_mov_b32 s2, -1
616 ; VI-NEXT: v_mov_b32_e32 v0, 0
617 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
618 ; VI-NEXT: s_endpgm
646 ; VI-LABEL: bfe_u32_test_5:
647 ; VI: ; %bb.0:
648 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
649 ; VI-NEXT: s_mov_b32 s3, 0xf000
650 ; VI-NEXT: s_mov_b32 s2, -1
651 ; VI-NEXT: s_waitcnt lgkmcnt(0)
652 ; VI-NEXT: s_mov_b32 s0, s4
653 ; VI-NEXT: s_mov_b32 s1, s5
654 ; VI-NEXT: s_mov_b32 s4, s6
655 ; VI-NEXT: s_mov_b32 s5, s7
656 ; VI-NEXT: s_mov_b32 s6, s2
657 ; VI-NEXT: s_mov_b32 s7, s3
658 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
659 ; VI-NEXT: s_waitcnt vmcnt(0)
660 ; VI-NEXT: v_bfe_i32 v0, v0, 0, 1
661 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
662 ; VI-NEXT: s_endpgm
691 ; VI-LABEL: bfe_u32_test_6:
692 ; VI: ; %bb.0:
693 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
694 ; VI-NEXT: s_mov_b32 s3, 0xf000
695 ; VI-NEXT: s_mov_b32 s2, -1
696 ; VI-NEXT: s_waitcnt lgkmcnt(0)
697 ; VI-NEXT: s_mov_b32 s0, s4
698 ; VI-NEXT: s_mov_b32 s1, s5
699 ; VI-NEXT: s_mov_b32 s4, s6
700 ; VI-NEXT: s_mov_b32 s5, s7
701 ; VI-NEXT: s_mov_b32 s6, s2
702 ; VI-NEXT: s_mov_b32 s7, s3
703 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
704 ; VI-NEXT: s_waitcnt vmcnt(0)
705 ; VI-NEXT: v_lshlrev_b32_e32 v0, 31, v0
706 ; VI-NEXT: v_lshrrev_b32_e32 v0, 1, v0
707 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
708 ; VI-NEXT: s_endpgm
735 ; VI-LABEL: bfe_u32_test_7:
736 ; VI: ; %bb.0:
737 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
738 ; VI-NEXT: s_mov_b32 s3, 0xf000
739 ; VI-NEXT: s_mov_b32 s2, -1
740 ; VI-NEXT: s_waitcnt lgkmcnt(0)
741 ; VI-NEXT: s_mov_b32 s0, s4
742 ; VI-NEXT: s_mov_b32 s1, s5
743 ; VI-NEXT: s_mov_b32 s4, s6
744 ; VI-NEXT: s_mov_b32 s5, s7
745 ; VI-NEXT: s_mov_b32 s6, s2
746 ; VI-NEXT: s_mov_b32 s7, s3
747 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
748 ; VI-NEXT: s_waitcnt vmcnt(0)
749 ; VI-NEXT: v_lshlrev_b32_e32 v0, 31, v0
750 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
751 ; VI-NEXT: s_endpgm
778 ; VI-LABEL: bfe_u32_test_8:
779 ; VI: ; %bb.0:
780 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
781 ; VI-NEXT: s_mov_b32 s3, 0xf000
782 ; VI-NEXT: s_mov_b32 s2, -1
783 ; VI-NEXT: s_waitcnt lgkmcnt(0)
784 ; VI-NEXT: s_mov_b32 s0, s4
785 ; VI-NEXT: s_mov_b32 s1, s5
786 ; VI-NEXT: s_mov_b32 s4, s6
787 ; VI-NEXT: s_mov_b32 s5, s7
788 ; VI-NEXT: s_mov_b32 s6, s2
789 ; VI-NEXT: s_mov_b32 s7, s3
790 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
791 ; VI-NEXT: s_waitcnt vmcnt(0)
792 ; VI-NEXT: v_and_b32_e32 v0, 1, v0
793 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
794 ; VI-NEXT: s_endpgm
821 ; VI-LABEL: bfe_u32_test_9:
822 ; VI: ; %bb.0:
823 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
824 ; VI-NEXT: s_mov_b32 s3, 0xf000
825 ; VI-NEXT: s_mov_b32 s2, -1
826 ; VI-NEXT: s_waitcnt lgkmcnt(0)
827 ; VI-NEXT: s_mov_b32 s0, s4
828 ; VI-NEXT: s_mov_b32 s1, s5
829 ; VI-NEXT: s_mov_b32 s4, s6
830 ; VI-NEXT: s_mov_b32 s5, s7
831 ; VI-NEXT: s_mov_b32 s6, s2
832 ; VI-NEXT: s_mov_b32 s7, s3
833 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
834 ; VI-NEXT: s_waitcnt vmcnt(0)
835 ; VI-NEXT: v_lshrrev_b32_e32 v0, 31, v0
836 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
837 ; VI-NEXT: s_endpgm
863 ; VI-LABEL: bfe_u32_test_10:
864 ; VI: ; %bb.0:
865 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
866 ; VI-NEXT: s_mov_b32 s3, 0xf000
867 ; VI-NEXT: s_mov_b32 s2, -1
868 ; VI-NEXT: s_waitcnt lgkmcnt(0)
869 ; VI-NEXT: s_mov_b32 s0, s4
870 ; VI-NEXT: s_mov_b32 s1, s5
871 ; VI-NEXT: s_mov_b32 s4, s6
872 ; VI-NEXT: s_mov_b32 s5, s7
873 ; VI-NEXT: s_mov_b32 s6, s2
874 ; VI-NEXT: s_mov_b32 s7, s3
875 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
876 ; VI-NEXT: s_waitcnt vmcnt(0)
877 ; VI-NEXT: v_lshrrev_b32_e32 v0, 1, v0
878 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
879 ; VI-NEXT: s_endpgm
905 ; VI-LABEL: bfe_u32_test_11:
906 ; VI: ; %bb.0:
907 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
908 ; VI-NEXT: s_mov_b32 s3, 0xf000
909 ; VI-NEXT: s_mov_b32 s2, -1
910 ; VI-NEXT: s_waitcnt lgkmcnt(0)
911 ; VI-NEXT: s_mov_b32 s0, s4
912 ; VI-NEXT: s_mov_b32 s1, s5
913 ; VI-NEXT: s_mov_b32 s4, s6
914 ; VI-NEXT: s_mov_b32 s5, s7
915 ; VI-NEXT: s_mov_b32 s6, s2
916 ; VI-NEXT: s_mov_b32 s7, s3
917 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
918 ; VI-NEXT: s_waitcnt vmcnt(0)
919 ; VI-NEXT: v_lshrrev_b32_e32 v0, 8, v0
920 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
921 ; VI-NEXT: s_endpgm
947 ; VI-LABEL: bfe_u32_test_12:
948 ; VI: ; %bb.0:
949 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
950 ; VI-NEXT: s_mov_b32 s3, 0xf000
951 ; VI-NEXT: s_mov_b32 s2, -1
952 ; VI-NEXT: s_waitcnt lgkmcnt(0)
953 ; VI-NEXT: s_mov_b32 s0, s4
954 ; VI-NEXT: s_mov_b32 s1, s5
955 ; VI-NEXT: s_mov_b32 s4, s6
956 ; VI-NEXT: s_mov_b32 s5, s7
957 ; VI-NEXT: s_mov_b32 s6, s2
958 ; VI-NEXT: s_mov_b32 s7, s3
959 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
960 ; VI-NEXT: s_waitcnt vmcnt(0)
961 ; VI-NEXT: v_lshrrev_b32_e32 v0, 24, v0
962 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
963 ; VI-NEXT: s_endpgm
990 ; VI-LABEL: bfe_u32_test_13:
991 ; VI: ; %bb.0:
992 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
993 ; VI-NEXT: s_mov_b32 s3, 0xf000
994 ; VI-NEXT: s_mov_b32 s2, -1
995 ; VI-NEXT: s_waitcnt lgkmcnt(0)
996 ; VI-NEXT: s_mov_b32 s0, s4
997 ; VI-NEXT: s_mov_b32 s1, s5
998 ; VI-NEXT: s_mov_b32 s4, s6
999 ; VI-NEXT: s_mov_b32 s5, s7
1000 ; VI-NEXT: s_mov_b32 s6, s2
1001 ; VI-NEXT: s_mov_b32 s7, s3
1002 ; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0
1003 ; VI-NEXT: s_waitcnt vmcnt(0)
1004 ; VI-NEXT: v_lshrrev_b32_e32 v0, 31, v0
1005 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1006 ; VI-NEXT: s_endpgm
1024 ; VI-LABEL: bfe_u32_test_14:
1025 ; VI: ; %bb.0:
1026 ; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
1027 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1028 ; VI-NEXT: s_mov_b32 s3, 0xf000
1029 ; VI-NEXT: s_mov_b32 s2, -1
1030 ; VI-NEXT: v_mov_b32_e32 v0, 0
1031 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1032 ; VI-NEXT: s_endpgm
1051 ; VI-LABEL: bfe_u32_constant_fold_test_0:
1052 ; VI: ; %bb.0:
1053 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1054 ; VI-NEXT: s_mov_b32 s3, 0xf000
1055 ; VI-NEXT: s_mov_b32 s2, -1
1056 ; VI-NEXT: v_mov_b32_e32 v0, 0
1057 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1058 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1059 ; VI-NEXT: s_endpgm
1077 ; VI-LABEL: bfe_u32_constant_fold_test_1:
1078 ; VI: ; %bb.0:
1079 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1080 ; VI-NEXT: s_mov_b32 s3, 0xf000
1081 ; VI-NEXT: s_mov_b32 s2, -1
1082 ; VI-NEXT: v_mov_b32_e32 v0, 0
1083 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1084 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1085 ; VI-NEXT: s_endpgm
1103 ; VI-LABEL: bfe_u32_constant_fold_test_2:
1104 ; VI: ; %bb.0:
1105 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1106 ; VI-NEXT: s_mov_b32 s3, 0xf000
1107 ; VI-NEXT: s_mov_b32 s2, -1
1108 ; VI-NEXT: v_mov_b32_e32 v0, 0
1109 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1110 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1111 ; VI-NEXT: s_endpgm
1129 ; VI-LABEL: bfe_u32_constant_fold_test_3:
1130 ; VI: ; %bb.0:
1131 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1132 ; VI-NEXT: s_mov_b32 s3, 0xf000
1133 ; VI-NEXT: s_mov_b32 s2, -1
1134 ; VI-NEXT: v_mov_b32_e32 v0, 1
1135 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1136 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1137 ; VI-NEXT: s_endpgm
1155 ; VI-LABEL: bfe_u32_constant_fold_test_4:
1156 ; VI: ; %bb.0:
1157 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1158 ; VI-NEXT: s_mov_b32 s3, 0xf000
1159 ; VI-NEXT: s_mov_b32 s2, -1
1160 ; VI-NEXT: v_mov_b32_e32 v0, -1
1161 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1162 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1163 ; VI-NEXT: s_endpgm
1181 ; VI-LABEL: bfe_u32_constant_fold_test_5:
1182 ; VI: ; %bb.0:
1183 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1184 ; VI-NEXT: s_mov_b32 s3, 0xf000
1185 ; VI-NEXT: s_mov_b32 s2, -1
1186 ; VI-NEXT: v_mov_b32_e32 v0, 1
1187 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1188 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1189 ; VI-NEXT: s_endpgm
1207 ; VI-LABEL: bfe_u32_constant_fold_test_6:
1208 ; VI: ; %bb.0:
1209 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1210 ; VI-NEXT: s_mov_b32 s3, 0xf000
1211 ; VI-NEXT: s_mov_b32 s2, -1
1212 ; VI-NEXT: v_mov_b32_e32 v0, 0x80
1213 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1214 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1215 ; VI-NEXT: s_endpgm
1233 ; VI-LABEL: bfe_u32_constant_fold_test_7:
1234 ; VI: ; %bb.0:
1235 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1236 ; VI-NEXT: s_mov_b32 s3, 0xf000
1237 ; VI-NEXT: s_mov_b32 s2, -1
1238 ; VI-NEXT: v_mov_b32_e32 v0, 0x7f
1239 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1240 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1241 ; VI-NEXT: s_endpgm
1259 ; VI-LABEL: bfe_u32_constant_fold_test_8:
1260 ; VI: ; %bb.0:
1261 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1262 ; VI-NEXT: s_mov_b32 s3, 0xf000
1263 ; VI-NEXT: s_mov_b32 s2, -1
1264 ; VI-NEXT: v_mov_b32_e32 v0, 1
1265 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1266 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1267 ; VI-NEXT: s_endpgm
1285 ; VI-LABEL: bfe_u32_constant_fold_test_9:
1286 ; VI: ; %bb.0:
1287 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1288 ; VI-NEXT: s_mov_b32 s3, 0xf000
1289 ; VI-NEXT: s_mov_b32 s2, -1
1290 ; VI-NEXT: v_mov_b32_e32 v0, 1
1291 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1292 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1293 ; VI-NEXT: s_endpgm
1311 ; VI-LABEL: bfe_u32_constant_fold_test_10:
1312 ; VI: ; %bb.0:
1313 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1314 ; VI-NEXT: s_mov_b32 s3, 0xf000
1315 ; VI-NEXT: s_mov_b32 s2, -1
1316 ; VI-NEXT: v_mov_b32_e32 v0, 0
1317 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1318 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1319 ; VI-NEXT: s_endpgm
1337 ; VI-LABEL: bfe_u32_constant_fold_test_11:
1338 ; VI: ; %bb.0:
1339 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1340 ; VI-NEXT: s_mov_b32 s3, 0xf000
1341 ; VI-NEXT: s_mov_b32 s2, -1
1342 ; VI-NEXT: v_mov_b32_e32 v0, 10
1343 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1344 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1345 ; VI-NEXT: s_endpgm
1363 ; VI-LABEL: bfe_u32_constant_fold_test_12:
1364 ; VI: ; %bb.0:
1365 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1366 ; VI-NEXT: s_mov_b32 s3, 0xf000
1367 ; VI-NEXT: s_mov_b32 s2, -1
1368 ; VI-NEXT: v_mov_b32_e32 v0, 0
1369 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1370 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1371 ; VI-NEXT: s_endpgm
1389 ; VI-LABEL: bfe_u32_constant_fold_test_13:
1390 ; VI: ; %bb.0:
1391 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1392 ; VI-NEXT: s_mov_b32 s3, 0xf000
1393 ; VI-NEXT: s_mov_b32 s2, -1
1394 ; VI-NEXT: v_mov_b32_e32 v0, 1
1395 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1396 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1397 ; VI-NEXT: s_endpgm
1415 ; VI-LABEL: bfe_u32_constant_fold_test_14:
1416 ; VI: ; %bb.0:
1417 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1418 ; VI-NEXT: s_mov_b32 s3, 0xf000
1419 ; VI-NEXT: s_mov_b32 s2, -1
1420 ; VI-NEXT: v_mov_b32_e32 v0, 40
1421 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1422 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1423 ; VI-NEXT: s_endpgm
1441 ; VI-LABEL: bfe_u32_constant_fold_test_15:
1442 ; VI: ; %bb.0:
1443 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1444 ; VI-NEXT: s_mov_b32 s3, 0xf000
1445 ; VI-NEXT: s_mov_b32 s2, -1
1446 ; VI-NEXT: v_mov_b32_e32 v0, 10
1447 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1448 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1449 ; VI-NEXT: s_endpgm
1467 ; VI-LABEL: bfe_u32_constant_fold_test_16:
1468 ; VI: ; %bb.0:
1469 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1470 ; VI-NEXT: s_mov_b32 s3, 0xf000
1471 ; VI-NEXT: s_mov_b32 s2, -1
1472 ; VI-NEXT: v_mov_b32_e32 v0, 0x7f
1473 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1474 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1475 ; VI-NEXT: s_endpgm
1493 ; VI-LABEL: bfe_u32_constant_fold_test_17:
1494 ; VI: ; %bb.0:
1495 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1496 ; VI-NEXT: s_mov_b32 s3, 0xf000
1497 ; VI-NEXT: s_mov_b32 s2, -1
1498 ; VI-NEXT: v_mov_b32_e32 v0, 0x7f
1499 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1500 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1501 ; VI-NEXT: s_endpgm
1519 ; VI-LABEL: bfe_u32_constant_fold_test_18:
1520 ; VI: ; %bb.0:
1521 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
1522 ; VI-NEXT: s_mov_b32 s3, 0xf000
1523 ; VI-NEXT: s_mov_b32 s2, -1
1524 ; VI-NEXT: v_mov_b32_e32 v0, 0
1525 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1526 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1527 ; VI-NEXT: s_endpgm
1559 ; VI-LABEL: simplify_bfe_u32_multi_use_arg:
1560 ; VI: ; %bb.0:
1561 ; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24
1562 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x34
1563 ; VI-NEXT: s_mov_b32 s11, 0xf000
1564 ; VI-NEXT: s_mov_b32 s10, -1
1565 ; VI-NEXT: s_mov_b32 s2, s10
1566 ; VI-NEXT: s_mov_b32 s3, s11
1567 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1568 ; VI-NEXT: buffer_load_dword v0, off, s[0:3], 0
1569 ; VI-NEXT: s_mov_b32 s8, s4
1570 ; VI-NEXT: s_mov_b32 s9, s5
1571 ; VI-NEXT: s_mov_b32 s0, s6
1572 ; VI-NEXT: s_mov_b32 s1, s7
1573 ; VI-NEXT: s_waitcnt vmcnt(0)
1574 ; VI-NEXT: v_and_b32_e32 v0, 63, v0
1575 ; VI-NEXT: v_bfe_u32 v1, v0, 2, 2
1576 ; VI-NEXT: buffer_store_dword v1, off, s[8:11], 0
1577 ; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0
1578 ; VI-NEXT: s_endpgm
1602 ; VI-LABEL: lshr_and:
1603 ; VI: ; %bb.0:
1604 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
1605 ; VI-NEXT: s_load_dword s0, s[0:1], 0x2c
1606 ; VI-NEXT: s_mov_b32 s7, 0xf000
1607 ; VI-NEXT: s_mov_b32 s6, -1
1608 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1609 ; VI-NEXT: s_bfe_u32 s0, s0, 0x30006
1610 ; VI-NEXT: v_mov_b32_e32 v0, s0
1611 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
1612 ; VI-NEXT: s_endpgm
1633 ; VI-LABEL: v_lshr_and:
1634 ; VI: ; %bb.0:
1635 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
1636 ; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2c
1637 ; VI-NEXT: s_mov_b32 s7, 0xf000
1638 ; VI-NEXT: s_mov_b32 s6, -1
1639 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1640 ; VI-NEXT: s_lshr_b32 s0, s0, s1
1641 ; VI-NEXT: s_and_b32 s0, s0, 7
1642 ; VI-NEXT: v_mov_b32_e32 v0, s0
1643 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
1644 ; VI-NEXT: s_endpgm
1664 ; VI-LABEL: and_lshr:
1665 ; VI: ; %bb.0:
1666 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
1667 ; VI-NEXT: s_load_dword s0, s[0:1], 0x2c
1668 ; VI-NEXT: s_mov_b32 s7, 0xf000
1669 ; VI-NEXT: s_mov_b32 s6, -1
1670 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1671 ; VI-NEXT: s_bfe_u32 s0, s0, 0x30006
1672 ; VI-NEXT: v_mov_b32_e32 v0, s0
1673 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
1674 ; VI-NEXT: s_endpgm
1694 ; VI-LABEL: and_lshr2:
1695 ; VI: ; %bb.0:
1696 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
1697 ; VI-NEXT: s_load_dword s0, s[0:1], 0x2c
1698 ; VI-NEXT: s_mov_b32 s7, 0xf000
1699 ; VI-NEXT: s_mov_b32 s6, -1
1700 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1701 ; VI-NEXT: s_bfe_u32 s0, s0, 0x30006
1702 ; VI-NEXT: v_mov_b32_e32 v0, s0
1703 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
1704 ; VI-NEXT: s_endpgm
1724 ; VI-LABEL: shl_lshr:
1725 ; VI: ; %bb.0:
1726 ; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24
1727 ; VI-NEXT: s_load_dword s0, s[0:1], 0x2c
1728 ; VI-NEXT: s_mov_b32 s7, 0xf000
1729 ; VI-NEXT: s_mov_b32 s6, -1
1730 ; VI-NEXT: s_waitcnt lgkmcnt(0)
1731 ; VI-NEXT: s_bfe_u32 s0, s0, 0x150002
1732 ; VI-NEXT: v_mov_b32_e32 v0, s0
1733 ; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0
1734 ; VI-NEXT: s_endpgm