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[6:7], 0x0
10 ; CHECK-NEXT: s_load_dwordx16 s[8:23], s[6:7], 0x8
11 ; CHECK-NEXT: v_mov_b32_e32 v0, 0
12 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
13 ; CHECK-NEXT: s_bitcmp0_b32 s0, 0
14 ; CHECK-NEXT: s_cbranch_scc1 .LBB0_2
15 ; CHECK-NEXT: ; %bb.1: ; %bb10
16 ; CHECK-NEXT: global_load_dwordx2 v[8:9], v0, s[8:9]
17 ; CHECK-NEXT: s_waitcnt vmcnt(0)
18 ; CHECK-NEXT: v_and_b32_e32 v7, 0xff, v8
19 ; CHECK-NEXT: v_bfe_u32 v6, v8, 8, 8
20 ; CHECK-NEXT: v_bfe_u32 v5, v8, 16, 8
21 ; CHECK-NEXT: v_lshrrev_b32_e32 v4, 24, v8
22 ; CHECK-NEXT: v_and_b32_e32 v3, 0xff, v9
23 ; CHECK-NEXT: v_bfe_u32 v2, v9, 8, 8
24 ; CHECK-NEXT: v_bfe_u32 v1, v9, 16, 8
25 ; CHECK-NEXT: v_lshrrev_b32_e32 v0, 24, v9
26 ; CHECK-NEXT: s_branch .LBB0_3
27 ; CHECK-NEXT: .LBB0_2:
28 ; CHECK-NEXT: v_mov_b32_e32 v1, 0
29 ; CHECK-NEXT: v_mov_b32_e32 v2, 0
30 ; CHECK-NEXT: v_mov_b32_e32 v3, 0
31 ; CHECK-NEXT: v_mov_b32_e32 v4, 0
32 ; CHECK-NEXT: v_mov_b32_e32 v5, 0
33 ; CHECK-NEXT: v_mov_b32_e32 v6, 0
34 ; CHECK-NEXT: v_mov_b32_e32 v7, 0
35 ; CHECK-NEXT: .LBB0_3: ; %bb41
36 ; CHECK-NEXT: s_load_dwordx2 s[0:1], s[6:7], 0x48
37 ; CHECK-NEXT: v_mov_b32_e32 v8, s10
38 ; CHECK-NEXT: v_mov_b32_e32 v9, s11
39 ; CHECK-NEXT: v_mov_b32_e32 v10, s12
40 ; CHECK-NEXT: v_mov_b32_e32 v11, s13
41 ; CHECK-NEXT: v_mov_b32_e32 v12, s14
42 ; CHECK-NEXT: v_mov_b32_e32 v13, s15
43 ; CHECK-NEXT: v_mov_b32_e32 v14, s16
44 ; CHECK-NEXT: v_mov_b32_e32 v15, s17
45 ; CHECK-NEXT: v_mov_b32_e32 v16, s18
46 ; CHECK-NEXT: v_mov_b32_e32 v17, s19
47 ; CHECK-NEXT: v_mov_b32_e32 v18, s20
48 ; CHECK-NEXT: v_mov_b32_e32 v19, s21
49 ; CHECK-NEXT: v_mov_b32_e32 v20, s22
50 ; CHECK-NEXT: v_mov_b32_e32 v21, s23
51 ; CHECK-NEXT: flat_store_byte v[8:9], v7
52 ; CHECK-NEXT: flat_store_byte v[10:11], v6
53 ; CHECK-NEXT: flat_store_byte v[12:13], v5
54 ; CHECK-NEXT: flat_store_byte v[14:15], v4
55 ; CHECK-NEXT: flat_store_byte v[16:17], v3
56 ; CHECK-NEXT: flat_store_byte v[18:19], v2
57 ; CHECK-NEXT: flat_store_byte v[20:21], v1
58 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
59 ; CHECK-NEXT: v_pk_mov_b32 v[2:3], s[0:1], s[0:1] op_sel:[0,1]
60 ; CHECK-NEXT: flat_store_byte v[2:3], v0
61 ; CHECK-NEXT: s_endpgm
63 br i1 %arg, label %bb10, label %bb41
66 %tmp12 = load <1 x i8>, ptr addrspace(1) %arg1
67 %tmp13 = getelementptr i8, ptr addrspace(1) %arg1, i64 1
68 %tmp16 = load <1 x i8>, ptr addrspace(1) %tmp13
69 %tmp17 = getelementptr i8, ptr addrspace(1) %arg1, i64 2
70 %tmp20 = load <1 x i8>, ptr addrspace(1) %tmp17
71 %tmp21 = getelementptr i8, ptr addrspace(1) %arg1, i64 3
72 %tmp24 = load <1 x i8>, ptr addrspace(1) %tmp21
73 %tmp25 = getelementptr i8, ptr addrspace(1) %arg1, i64 4
74 %tmp28 = load <1 x i8>, ptr addrspace(1) %tmp25
75 %tmp29 = getelementptr i8, ptr addrspace(1) %arg1, i64 5
76 %tmp32 = load <1 x i8>, ptr addrspace(1) %tmp29
77 %tmp33 = getelementptr i8, ptr addrspace(1) %arg1, i64 6
78 %tmp36 = load <1 x i8>, ptr addrspace(1) %tmp33
79 %tmp37 = getelementptr i8, ptr addrspace(1) %arg1, i64 7
80 %tmp40 = load <1 x i8>, ptr addrspace(1) %tmp37
83 bb41: ; preds = %bb10, %bb
84 %tmp42 = phi <1 x i8> [ %tmp40, %bb10 ], [ zeroinitializer, %bb ]
85 %tmp43 = phi <1 x i8> [ %tmp36, %bb10 ], [ zeroinitializer, %bb ]
86 %tmp44 = phi <1 x i8> [ %tmp32, %bb10 ], [ zeroinitializer, %bb ]
87 %tmp45 = phi <1 x i8> [ %tmp28, %bb10 ], [ zeroinitializer, %bb ]
88 %tmp46 = phi <1 x i8> [ %tmp24, %bb10 ], [ zeroinitializer, %bb ]
89 %tmp47 = phi <1 x i8> [ %tmp20, %bb10 ], [ zeroinitializer, %bb ]
90 %tmp48 = phi <1 x i8> [ %tmp16, %bb10 ], [ zeroinitializer, %bb ]
91 %tmp49 = phi <1 x i8> [ %tmp12, %bb10 ], [ zeroinitializer, %bb ]
92 store <1 x i8> %tmp49, ptr %arg2
93 store <1 x i8> %tmp48, ptr %arg3
94 store <1 x i8> %tmp47, ptr %arg4
95 store <1 x i8> %tmp46, ptr %arg5
96 store <1 x i8> %tmp45, ptr %arg6
97 store <1 x i8> %tmp44, ptr %arg7
98 store <1 x i8> %tmp43, ptr %arg8
99 store <1 x i8> %tmp42, ptr %arg9