1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a < %s | FileCheck -enable-var-scope %s
4 ; This code is used to trigger the following dag node, with different return type and vector element type: i16 extract_vec_elt <N x i8> v, 0
6 define amdgpu_kernel void @eggs(i1 %arg, ptr addrspace(1) %arg1, ptr %arg2, ptr %arg3, ptr %arg4, ptr %arg5, ptr %arg6, ptr %arg7, ptr %arg8, ptr %arg9) {
8 ; CHECK: ; %bb.0: ; %bb
9 ; CHECK-NEXT: s_load_dword s0, s[4:5], 0x0
10 ; CHECK-NEXT: s_load_dwordx16 s[8:23], s[4:5], 0x8
11 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
12 ; CHECK-NEXT: s_bitcmp0_b32 s0, 0
13 ; CHECK-NEXT: s_cbranch_scc1 .LBB0_2
14 ; CHECK-NEXT: ; %bb.1: ; %bb10
15 ; CHECK-NEXT: v_mov_b32_e32 v0, 0
16 ; CHECK-NEXT: global_load_dwordx2 v[0:1], v0, s[8:9]
17 ; CHECK-NEXT: s_waitcnt vmcnt(0)
18 ; CHECK-NEXT: v_lshrrev_b32_e32 v7, 8, v0
19 ; CHECK-NEXT: v_lshrrev_b32_e32 v6, 16, v0
20 ; CHECK-NEXT: v_lshrrev_b32_e32 v5, 24, v0
21 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 8, v1
22 ; CHECK-NEXT: v_lshrrev_b32_e32 v3, 16, v1
23 ; CHECK-NEXT: v_lshrrev_b32_e32 v2, 24, v1
24 ; CHECK-NEXT: s_branch .LBB0_3
25 ; CHECK-NEXT: .LBB0_2:
26 ; CHECK-NEXT: v_mov_b32_e32 v2, 0
27 ; CHECK-NEXT: v_mov_b32_e32 v3, 0
28 ; CHECK-NEXT: v_mov_b32_e32 v4, 0
29 ; CHECK-NEXT: v_mov_b32_e32 v1, 0
30 ; CHECK-NEXT: v_mov_b32_e32 v5, 0
31 ; CHECK-NEXT: v_mov_b32_e32 v6, 0
32 ; CHECK-NEXT: v_mov_b32_e32 v7, 0
33 ; CHECK-NEXT: v_mov_b32_e32 v0, 0
34 ; CHECK-NEXT: .LBB0_3: ; %bb41
35 ; CHECK-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x48
36 ; CHECK-NEXT: v_mov_b32_e32 v8, s10
37 ; CHECK-NEXT: v_mov_b32_e32 v9, s11
38 ; CHECK-NEXT: v_mov_b32_e32 v10, s12
39 ; CHECK-NEXT: v_mov_b32_e32 v11, s13
40 ; CHECK-NEXT: v_mov_b32_e32 v12, s14
41 ; CHECK-NEXT: v_mov_b32_e32 v13, s15
42 ; CHECK-NEXT: v_mov_b32_e32 v14, s16
43 ; CHECK-NEXT: v_mov_b32_e32 v15, s17
44 ; CHECK-NEXT: v_mov_b32_e32 v16, s18
45 ; CHECK-NEXT: v_mov_b32_e32 v17, s19
46 ; CHECK-NEXT: v_mov_b32_e32 v18, s20
47 ; CHECK-NEXT: v_mov_b32_e32 v19, s21
48 ; CHECK-NEXT: v_mov_b32_e32 v20, s22
49 ; CHECK-NEXT: v_mov_b32_e32 v21, s23
50 ; CHECK-NEXT: flat_store_byte v[8:9], v0
51 ; CHECK-NEXT: flat_store_byte v[10:11], v7
52 ; CHECK-NEXT: flat_store_byte v[12:13], v6
53 ; CHECK-NEXT: flat_store_byte v[14:15], v5
54 ; CHECK-NEXT: flat_store_byte v[16:17], v1
55 ; CHECK-NEXT: flat_store_byte v[18:19], v4
56 ; CHECK-NEXT: flat_store_byte v[20:21], v3
57 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
58 ; CHECK-NEXT: v_pk_mov_b32 v[0:1], s[0:1], s[0:1] op_sel:[0,1]
59 ; CHECK-NEXT: flat_store_byte v[0:1], v2
60 ; CHECK-NEXT: s_endpgm
62 br i1 %arg, label %bb10, label %bb41
65 %tmp12 = load <1 x i8>, ptr addrspace(1) %arg1
66 %tmp13 = getelementptr i8, ptr addrspace(1) %arg1, i64 1
67 %tmp16 = load <1 x i8>, ptr addrspace(1) %tmp13
68 %tmp17 = getelementptr i8, ptr addrspace(1) %arg1, i64 2
69 %tmp20 = load <1 x i8>, ptr addrspace(1) %tmp17
70 %tmp21 = getelementptr i8, ptr addrspace(1) %arg1, i64 3
71 %tmp24 = load <1 x i8>, ptr addrspace(1) %tmp21
72 %tmp25 = getelementptr i8, ptr addrspace(1) %arg1, i64 4
73 %tmp28 = load <1 x i8>, ptr addrspace(1) %tmp25
74 %tmp29 = getelementptr i8, ptr addrspace(1) %arg1, i64 5
75 %tmp32 = load <1 x i8>, ptr addrspace(1) %tmp29
76 %tmp33 = getelementptr i8, ptr addrspace(1) %arg1, i64 6
77 %tmp36 = load <1 x i8>, ptr addrspace(1) %tmp33
78 %tmp37 = getelementptr i8, ptr addrspace(1) %arg1, i64 7
79 %tmp40 = load <1 x i8>, ptr addrspace(1) %tmp37
82 bb41: ; preds = %bb10, %bb
83 %tmp42 = phi <1 x i8> [ %tmp40, %bb10 ], [ zeroinitializer, %bb ]
84 %tmp43 = phi <1 x i8> [ %tmp36, %bb10 ], [ zeroinitializer, %bb ]
85 %tmp44 = phi <1 x i8> [ %tmp32, %bb10 ], [ zeroinitializer, %bb ]
86 %tmp45 = phi <1 x i8> [ %tmp28, %bb10 ], [ zeroinitializer, %bb ]
87 %tmp46 = phi <1 x i8> [ %tmp24, %bb10 ], [ zeroinitializer, %bb ]
88 %tmp47 = phi <1 x i8> [ %tmp20, %bb10 ], [ zeroinitializer, %bb ]
89 %tmp48 = phi <1 x i8> [ %tmp16, %bb10 ], [ zeroinitializer, %bb ]
90 %tmp49 = phi <1 x i8> [ %tmp12, %bb10 ], [ zeroinitializer, %bb ]
91 store <1 x i8> %tmp49, ptr %arg2
92 store <1 x i8> %tmp48, ptr %arg3
93 store <1 x i8> %tmp47, ptr %arg4
94 store <1 x i8> %tmp46, ptr %arg5
95 store <1 x i8> %tmp45, ptr %arg6
96 store <1 x i8> %tmp44, ptr %arg7
97 store <1 x i8> %tmp43, ptr %arg8
98 store <1 x i8> %tmp42, ptr %arg9