1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -mattr=-xnack -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN %s
4 ; Check lowering of some large extractelement that use the stack
5 ; instead of register indexing.
7 define i32 @v_extract_v64i32_varidx(<64 x i32> addrspace(1)* %ptr, i32 %idx) {
8 ; GCN-LABEL: v_extract_v64i32_varidx:
10 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
11 ; GCN-NEXT: s_mov_b32 s4, s33
12 ; GCN-NEXT: s_add_i32 s33, s32, 0x3fc0
13 ; GCN-NEXT: s_and_b32 s33, s33, 0xffffc000
14 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:56 ; 4-byte Folded Spill
15 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:52 ; 4-byte Folded Spill
16 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:48 ; 4-byte Folded Spill
17 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:44 ; 4-byte Folded Spill
18 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:40 ; 4-byte Folded Spill
19 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:36 ; 4-byte Folded Spill
20 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:32 ; 4-byte Folded Spill
21 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:28 ; 4-byte Folded Spill
22 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:24 ; 4-byte Folded Spill
23 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill
24 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill
25 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill
26 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
27 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
28 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 ; 4-byte Folded Spill
29 ; GCN-NEXT: global_load_dwordx4 v[3:6], v[0:1], off
30 ; GCN-NEXT: global_load_dwordx4 v[7:10], v[0:1], off offset:16
31 ; GCN-NEXT: global_load_dwordx4 v[11:14], v[0:1], off offset:32
32 ; GCN-NEXT: global_load_dwordx4 v[15:18], v[0:1], off offset:48
33 ; GCN-NEXT: global_load_dwordx4 v[19:22], v[0:1], off offset:64
34 ; GCN-NEXT: global_load_dwordx4 v[23:26], v[0:1], off offset:80
35 ; GCN-NEXT: global_load_dwordx4 v[27:30], v[0:1], off offset:96
36 ; GCN-NEXT: global_load_dwordx4 v[31:34], v[0:1], off offset:112
37 ; GCN-NEXT: global_load_dwordx4 v[35:38], v[0:1], off offset:128
38 ; GCN-NEXT: global_load_dwordx4 v[39:42], v[0:1], off offset:144
39 ; GCN-NEXT: global_load_dwordx4 v[43:46], v[0:1], off offset:160
40 ; GCN-NEXT: global_load_dwordx4 v[47:50], v[0:1], off offset:176
41 ; GCN-NEXT: s_add_i32 s32, s32, 0x10000
42 ; GCN-NEXT: s_add_i32 s32, s32, 0xffff0000
43 ; GCN-NEXT: s_waitcnt vmcnt(0)
44 ; GCN-NEXT: buffer_store_dword v35, off, s[0:3], s33 offset:640 ; 4-byte Folded Spill
45 ; GCN-NEXT: s_waitcnt vmcnt(0)
46 ; GCN-NEXT: buffer_store_dword v36, off, s[0:3], s33 offset:644 ; 4-byte Folded Spill
47 ; GCN-NEXT: buffer_store_dword v37, off, s[0:3], s33 offset:648 ; 4-byte Folded Spill
48 ; GCN-NEXT: buffer_store_dword v38, off, s[0:3], s33 offset:652 ; 4-byte Folded Spill
49 ; GCN-NEXT: buffer_store_dword v39, off, s[0:3], s33 offset:656 ; 4-byte Folded Spill
50 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:660 ; 4-byte Folded Spill
51 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:664 ; 4-byte Folded Spill
52 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:668 ; 4-byte Folded Spill
53 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:672 ; 4-byte Folded Spill
54 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:676 ; 4-byte Folded Spill
55 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:680 ; 4-byte Folded Spill
56 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:684 ; 4-byte Folded Spill
57 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:688 ; 4-byte Folded Spill
58 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:692 ; 4-byte Folded Spill
59 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:696 ; 4-byte Folded Spill
60 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:700 ; 4-byte Folded Spill
61 ; GCN-NEXT: global_load_dwordx4 v[47:50], v[0:1], off offset:192
62 ; GCN-NEXT: s_waitcnt vmcnt(0)
63 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:576 ; 4-byte Folded Spill
64 ; GCN-NEXT: s_waitcnt vmcnt(0)
65 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:580 ; 4-byte Folded Spill
66 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:584 ; 4-byte Folded Spill
67 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:588 ; 4-byte Folded Spill
68 ; GCN-NEXT: buffer_store_dword v51, off, s[0:3], s33 offset:592 ; 4-byte Folded Spill
69 ; GCN-NEXT: buffer_store_dword v52, off, s[0:3], s33 offset:596 ; 4-byte Folded Spill
70 ; GCN-NEXT: buffer_store_dword v53, off, s[0:3], s33 offset:600 ; 4-byte Folded Spill
71 ; GCN-NEXT: buffer_store_dword v54, off, s[0:3], s33 offset:604 ; 4-byte Folded Spill
72 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:608 ; 4-byte Folded Spill
73 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:612 ; 4-byte Folded Spill
74 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:616 ; 4-byte Folded Spill
75 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:620 ; 4-byte Folded Spill
76 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:624 ; 4-byte Folded Spill
77 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:628 ; 4-byte Folded Spill
78 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:632 ; 4-byte Folded Spill
79 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:636 ; 4-byte Folded Spill
80 ; GCN-NEXT: global_load_dwordx4 v[51:54], v[0:1], off offset:208
81 ; GCN-NEXT: s_waitcnt vmcnt(0)
82 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:512 ; 4-byte Folded Spill
83 ; GCN-NEXT: s_waitcnt vmcnt(0)
84 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:516 ; 4-byte Folded Spill
85 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:520 ; 4-byte Folded Spill
86 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:524 ; 4-byte Folded Spill
87 ; GCN-NEXT: buffer_store_dword v51, off, s[0:3], s33 offset:528 ; 4-byte Folded Spill
88 ; GCN-NEXT: buffer_store_dword v52, off, s[0:3], s33 offset:532 ; 4-byte Folded Spill
89 ; GCN-NEXT: buffer_store_dword v53, off, s[0:3], s33 offset:536 ; 4-byte Folded Spill
90 ; GCN-NEXT: buffer_store_dword v54, off, s[0:3], s33 offset:540 ; 4-byte Folded Spill
91 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:544 ; 4-byte Folded Spill
92 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:548 ; 4-byte Folded Spill
93 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:552 ; 4-byte Folded Spill
94 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:556 ; 4-byte Folded Spill
95 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:560 ; 4-byte Folded Spill
96 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:564 ; 4-byte Folded Spill
97 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:568 ; 4-byte Folded Spill
98 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:572 ; 4-byte Folded Spill
99 ; GCN-NEXT: global_load_dwordx4 v[55:58], v[0:1], off offset:224
100 ; GCN-NEXT: global_load_dwordx4 v[59:62], v[0:1], off offset:240
101 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:256
102 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:260
103 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:264
104 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:268
105 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:272
106 ; GCN-NEXT: buffer_store_dword v8, off, s[0:3], s33 offset:276
107 ; GCN-NEXT: buffer_store_dword v9, off, s[0:3], s33 offset:280
108 ; GCN-NEXT: buffer_store_dword v10, off, s[0:3], s33 offset:284
109 ; GCN-NEXT: buffer_store_dword v11, off, s[0:3], s33 offset:288
110 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:292
111 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:296
112 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:300
113 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:304
114 ; GCN-NEXT: buffer_store_dword v16, off, s[0:3], s33 offset:308
115 ; GCN-NEXT: buffer_store_dword v17, off, s[0:3], s33 offset:312
116 ; GCN-NEXT: buffer_store_dword v18, off, s[0:3], s33 offset:316
117 ; GCN-NEXT: buffer_store_dword v19, off, s[0:3], s33 offset:320
118 ; GCN-NEXT: buffer_store_dword v20, off, s[0:3], s33 offset:324
119 ; GCN-NEXT: buffer_store_dword v21, off, s[0:3], s33 offset:328
120 ; GCN-NEXT: buffer_store_dword v22, off, s[0:3], s33 offset:332
121 ; GCN-NEXT: buffer_store_dword v23, off, s[0:3], s33 offset:336
122 ; GCN-NEXT: buffer_store_dword v24, off, s[0:3], s33 offset:340
123 ; GCN-NEXT: buffer_store_dword v25, off, s[0:3], s33 offset:344
124 ; GCN-NEXT: buffer_store_dword v26, off, s[0:3], s33 offset:348
125 ; GCN-NEXT: buffer_store_dword v27, off, s[0:3], s33 offset:352
126 ; GCN-NEXT: buffer_store_dword v28, off, s[0:3], s33 offset:356
127 ; GCN-NEXT: buffer_store_dword v29, off, s[0:3], s33 offset:360
128 ; GCN-NEXT: buffer_store_dword v30, off, s[0:3], s33 offset:364
129 ; GCN-NEXT: buffer_store_dword v31, off, s[0:3], s33 offset:368
130 ; GCN-NEXT: buffer_store_dword v32, off, s[0:3], s33 offset:372
131 ; GCN-NEXT: buffer_store_dword v33, off, s[0:3], s33 offset:376
132 ; GCN-NEXT: buffer_store_dword v34, off, s[0:3], s33 offset:380
133 ; GCN-NEXT: buffer_store_dword v35, off, s[0:3], s33 offset:384
134 ; GCN-NEXT: buffer_store_dword v36, off, s[0:3], s33 offset:388
135 ; GCN-NEXT: buffer_store_dword v37, off, s[0:3], s33 offset:392
136 ; GCN-NEXT: buffer_store_dword v38, off, s[0:3], s33 offset:396
137 ; GCN-NEXT: buffer_store_dword v39, off, s[0:3], s33 offset:400
138 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:404
139 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:408
140 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:412
141 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:416
142 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:420
143 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:424
144 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:428
145 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:640 ; 4-byte Folded Reload
146 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:644 ; 4-byte Folded Reload
147 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:648 ; 4-byte Folded Reload
148 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:652 ; 4-byte Folded Reload
149 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:656 ; 4-byte Folded Reload
150 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:660 ; 4-byte Folded Reload
151 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:664 ; 4-byte Folded Reload
152 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:668 ; 4-byte Folded Reload
153 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:672 ; 4-byte Folded Reload
154 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:676 ; 4-byte Folded Reload
155 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:680 ; 4-byte Folded Reload
156 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:684 ; 4-byte Folded Reload
157 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:688 ; 4-byte Folded Reload
158 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:692 ; 4-byte Folded Reload
159 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:696 ; 4-byte Folded Reload
160 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:700 ; 4-byte Folded Reload
161 ; GCN-NEXT: v_and_b32_e32 v0, 63, v2
162 ; GCN-NEXT: v_lshrrev_b32_e64 v1, 6, s33
163 ; GCN-NEXT: v_lshlrev_b32_e32 v0, 2, v0
164 ; GCN-NEXT: v_add_u32_e32 v1, 0x100, v1
165 ; GCN-NEXT: v_add_u32_e32 v0, v1, v0
166 ; GCN-NEXT: s_waitcnt vmcnt(0)
167 ; GCN-NEXT: v_mov_b32_e32 v12, v15
168 ; GCN-NEXT: v_mov_b32_e32 v13, v16
169 ; GCN-NEXT: v_mov_b32_e32 v14, v17
170 ; GCN-NEXT: v_mov_b32_e32 v15, v18
171 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:432
172 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:436
173 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:440
174 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:444
175 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:576 ; 4-byte Folded Reload
176 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:580 ; 4-byte Folded Reload
177 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:584 ; 4-byte Folded Reload
178 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:588 ; 4-byte Folded Reload
179 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:592 ; 4-byte Folded Reload
180 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:596 ; 4-byte Folded Reload
181 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:600 ; 4-byte Folded Reload
182 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:604 ; 4-byte Folded Reload
183 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:608 ; 4-byte Folded Reload
184 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:612 ; 4-byte Folded Reload
185 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:616 ; 4-byte Folded Reload
186 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:620 ; 4-byte Folded Reload
187 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:624 ; 4-byte Folded Reload
188 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:628 ; 4-byte Folded Reload
189 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:632 ; 4-byte Folded Reload
190 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:636 ; 4-byte Folded Reload
191 ; GCN-NEXT: s_waitcnt vmcnt(0)
192 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:448
193 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:452
194 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:456
195 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:460
196 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:512 ; 4-byte Folded Reload
197 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:516 ; 4-byte Folded Reload
198 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:520 ; 4-byte Folded Reload
199 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:524 ; 4-byte Folded Reload
200 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:528 ; 4-byte Folded Reload
201 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:532 ; 4-byte Folded Reload
202 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:536 ; 4-byte Folded Reload
203 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:540 ; 4-byte Folded Reload
204 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:544 ; 4-byte Folded Reload
205 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:548 ; 4-byte Folded Reload
206 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:552 ; 4-byte Folded Reload
207 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:556 ; 4-byte Folded Reload
208 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:560 ; 4-byte Folded Reload
209 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:564 ; 4-byte Folded Reload
210 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:568 ; 4-byte Folded Reload
211 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:572 ; 4-byte Folded Reload
212 ; GCN-NEXT: s_waitcnt vmcnt(0)
213 ; GCN-NEXT: v_mov_b32_e32 v4, v7
214 ; GCN-NEXT: v_mov_b32_e32 v5, v8
215 ; GCN-NEXT: v_mov_b32_e32 v6, v9
216 ; GCN-NEXT: v_mov_b32_e32 v7, v10
217 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:464
218 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:468
219 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:472
220 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:476
221 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:480
222 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:484
223 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:488
224 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:492
225 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:496
226 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:500
227 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:504
228 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:508
229 ; GCN-NEXT: buffer_load_dword v0, v0, s[0:3], 0 offen
230 ; GCN-NEXT: buffer_load_dword v62, off, s[0:3], s33 ; 4-byte Folded Reload
231 ; GCN-NEXT: buffer_load_dword v61, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
232 ; GCN-NEXT: buffer_load_dword v60, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
233 ; GCN-NEXT: buffer_load_dword v59, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload
234 ; GCN-NEXT: buffer_load_dword v58, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload
235 ; GCN-NEXT: buffer_load_dword v57, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload
236 ; GCN-NEXT: buffer_load_dword v56, off, s[0:3], s33 offset:24 ; 4-byte Folded Reload
237 ; GCN-NEXT: buffer_load_dword v47, off, s[0:3], s33 offset:28 ; 4-byte Folded Reload
238 ; GCN-NEXT: buffer_load_dword v46, off, s[0:3], s33 offset:32 ; 4-byte Folded Reload
239 ; GCN-NEXT: buffer_load_dword v45, off, s[0:3], s33 offset:36 ; 4-byte Folded Reload
240 ; GCN-NEXT: buffer_load_dword v44, off, s[0:3], s33 offset:40 ; 4-byte Folded Reload
241 ; GCN-NEXT: buffer_load_dword v43, off, s[0:3], s33 offset:44 ; 4-byte Folded Reload
242 ; GCN-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:48 ; 4-byte Folded Reload
243 ; GCN-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:52 ; 4-byte Folded Reload
244 ; GCN-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:56 ; 4-byte Folded Reload
245 ; GCN-NEXT: s_mov_b32 s33, s4
246 ; GCN-NEXT: s_waitcnt vmcnt(0)
247 ; GCN-NEXT: s_setpc_b64 s[30:31]
248 %vec = load <64 x i32>, <64 x i32> addrspace(1)* %ptr
249 %elt = extractelement <64 x i32> %vec, i32 %idx
253 define i16 @v_extract_v128i16_varidx(<128 x i16> addrspace(1)* %ptr, i32 %idx) {
254 ; GCN-LABEL: v_extract_v128i16_varidx:
256 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
257 ; GCN-NEXT: s_mov_b32 s4, s33
258 ; GCN-NEXT: s_add_i32 s33, s32, 0x3fc0
259 ; GCN-NEXT: s_and_b32 s33, s33, 0xffffc000
260 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:56 ; 4-byte Folded Spill
261 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:52 ; 4-byte Folded Spill
262 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:48 ; 4-byte Folded Spill
263 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:44 ; 4-byte Folded Spill
264 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:40 ; 4-byte Folded Spill
265 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:36 ; 4-byte Folded Spill
266 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:32 ; 4-byte Folded Spill
267 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:28 ; 4-byte Folded Spill
268 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:24 ; 4-byte Folded Spill
269 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill
270 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill
271 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill
272 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
273 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
274 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 ; 4-byte Folded Spill
275 ; GCN-NEXT: global_load_dwordx4 v[3:6], v[0:1], off
276 ; GCN-NEXT: global_load_dwordx4 v[7:10], v[0:1], off offset:16
277 ; GCN-NEXT: global_load_dwordx4 v[11:14], v[0:1], off offset:32
278 ; GCN-NEXT: global_load_dwordx4 v[15:18], v[0:1], off offset:48
279 ; GCN-NEXT: global_load_dwordx4 v[19:22], v[0:1], off offset:64
280 ; GCN-NEXT: global_load_dwordx4 v[23:26], v[0:1], off offset:80
281 ; GCN-NEXT: global_load_dwordx4 v[27:30], v[0:1], off offset:96
282 ; GCN-NEXT: global_load_dwordx4 v[31:34], v[0:1], off offset:112
283 ; GCN-NEXT: global_load_dwordx4 v[35:38], v[0:1], off offset:128
284 ; GCN-NEXT: global_load_dwordx4 v[39:42], v[0:1], off offset:144
285 ; GCN-NEXT: global_load_dwordx4 v[43:46], v[0:1], off offset:160
286 ; GCN-NEXT: global_load_dwordx4 v[47:50], v[0:1], off offset:176
287 ; GCN-NEXT: s_add_i32 s32, s32, 0x10000
288 ; GCN-NEXT: s_add_i32 s32, s32, 0xffff0000
289 ; GCN-NEXT: s_waitcnt vmcnt(0)
290 ; GCN-NEXT: buffer_store_dword v35, off, s[0:3], s33 offset:640 ; 4-byte Folded Spill
291 ; GCN-NEXT: s_waitcnt vmcnt(0)
292 ; GCN-NEXT: buffer_store_dword v36, off, s[0:3], s33 offset:644 ; 4-byte Folded Spill
293 ; GCN-NEXT: buffer_store_dword v37, off, s[0:3], s33 offset:648 ; 4-byte Folded Spill
294 ; GCN-NEXT: buffer_store_dword v38, off, s[0:3], s33 offset:652 ; 4-byte Folded Spill
295 ; GCN-NEXT: buffer_store_dword v39, off, s[0:3], s33 offset:656 ; 4-byte Folded Spill
296 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:660 ; 4-byte Folded Spill
297 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:664 ; 4-byte Folded Spill
298 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:668 ; 4-byte Folded Spill
299 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:672 ; 4-byte Folded Spill
300 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:676 ; 4-byte Folded Spill
301 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:680 ; 4-byte Folded Spill
302 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:684 ; 4-byte Folded Spill
303 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:688 ; 4-byte Folded Spill
304 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:692 ; 4-byte Folded Spill
305 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:696 ; 4-byte Folded Spill
306 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:700 ; 4-byte Folded Spill
307 ; GCN-NEXT: global_load_dwordx4 v[47:50], v[0:1], off offset:192
308 ; GCN-NEXT: s_waitcnt vmcnt(0)
309 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:576 ; 4-byte Folded Spill
310 ; GCN-NEXT: s_waitcnt vmcnt(0)
311 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:580 ; 4-byte Folded Spill
312 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:584 ; 4-byte Folded Spill
313 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:588 ; 4-byte Folded Spill
314 ; GCN-NEXT: buffer_store_dword v51, off, s[0:3], s33 offset:592 ; 4-byte Folded Spill
315 ; GCN-NEXT: buffer_store_dword v52, off, s[0:3], s33 offset:596 ; 4-byte Folded Spill
316 ; GCN-NEXT: buffer_store_dword v53, off, s[0:3], s33 offset:600 ; 4-byte Folded Spill
317 ; GCN-NEXT: buffer_store_dword v54, off, s[0:3], s33 offset:604 ; 4-byte Folded Spill
318 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:608 ; 4-byte Folded Spill
319 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:612 ; 4-byte Folded Spill
320 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:616 ; 4-byte Folded Spill
321 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:620 ; 4-byte Folded Spill
322 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:624 ; 4-byte Folded Spill
323 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:628 ; 4-byte Folded Spill
324 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:632 ; 4-byte Folded Spill
325 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:636 ; 4-byte Folded Spill
326 ; GCN-NEXT: global_load_dwordx4 v[51:54], v[0:1], off offset:208
327 ; GCN-NEXT: s_waitcnt vmcnt(0)
328 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:512 ; 4-byte Folded Spill
329 ; GCN-NEXT: s_waitcnt vmcnt(0)
330 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:516 ; 4-byte Folded Spill
331 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:520 ; 4-byte Folded Spill
332 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:524 ; 4-byte Folded Spill
333 ; GCN-NEXT: buffer_store_dword v51, off, s[0:3], s33 offset:528 ; 4-byte Folded Spill
334 ; GCN-NEXT: buffer_store_dword v52, off, s[0:3], s33 offset:532 ; 4-byte Folded Spill
335 ; GCN-NEXT: buffer_store_dword v53, off, s[0:3], s33 offset:536 ; 4-byte Folded Spill
336 ; GCN-NEXT: buffer_store_dword v54, off, s[0:3], s33 offset:540 ; 4-byte Folded Spill
337 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:544 ; 4-byte Folded Spill
338 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:548 ; 4-byte Folded Spill
339 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:552 ; 4-byte Folded Spill
340 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:556 ; 4-byte Folded Spill
341 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:560 ; 4-byte Folded Spill
342 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:564 ; 4-byte Folded Spill
343 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:568 ; 4-byte Folded Spill
344 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:572 ; 4-byte Folded Spill
345 ; GCN-NEXT: global_load_dwordx4 v[55:58], v[0:1], off offset:224
346 ; GCN-NEXT: global_load_dwordx4 v[59:62], v[0:1], off offset:240
347 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:256
348 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:260
349 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:264
350 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:268
351 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:272
352 ; GCN-NEXT: buffer_store_dword v8, off, s[0:3], s33 offset:276
353 ; GCN-NEXT: buffer_store_dword v9, off, s[0:3], s33 offset:280
354 ; GCN-NEXT: buffer_store_dword v10, off, s[0:3], s33 offset:284
355 ; GCN-NEXT: buffer_store_dword v11, off, s[0:3], s33 offset:288
356 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:292
357 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:296
358 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:300
359 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:304
360 ; GCN-NEXT: buffer_store_dword v16, off, s[0:3], s33 offset:308
361 ; GCN-NEXT: buffer_store_dword v17, off, s[0:3], s33 offset:312
362 ; GCN-NEXT: buffer_store_dword v18, off, s[0:3], s33 offset:316
363 ; GCN-NEXT: buffer_store_dword v19, off, s[0:3], s33 offset:320
364 ; GCN-NEXT: buffer_store_dword v20, off, s[0:3], s33 offset:324
365 ; GCN-NEXT: buffer_store_dword v21, off, s[0:3], s33 offset:328
366 ; GCN-NEXT: buffer_store_dword v22, off, s[0:3], s33 offset:332
367 ; GCN-NEXT: buffer_store_dword v23, off, s[0:3], s33 offset:336
368 ; GCN-NEXT: buffer_store_dword v24, off, s[0:3], s33 offset:340
369 ; GCN-NEXT: buffer_store_dword v25, off, s[0:3], s33 offset:344
370 ; GCN-NEXT: buffer_store_dword v26, off, s[0:3], s33 offset:348
371 ; GCN-NEXT: buffer_store_dword v27, off, s[0:3], s33 offset:352
372 ; GCN-NEXT: buffer_store_dword v28, off, s[0:3], s33 offset:356
373 ; GCN-NEXT: buffer_store_dword v29, off, s[0:3], s33 offset:360
374 ; GCN-NEXT: buffer_store_dword v30, off, s[0:3], s33 offset:364
375 ; GCN-NEXT: buffer_store_dword v31, off, s[0:3], s33 offset:368
376 ; GCN-NEXT: buffer_store_dword v32, off, s[0:3], s33 offset:372
377 ; GCN-NEXT: buffer_store_dword v33, off, s[0:3], s33 offset:376
378 ; GCN-NEXT: buffer_store_dword v34, off, s[0:3], s33 offset:380
379 ; GCN-NEXT: buffer_store_dword v35, off, s[0:3], s33 offset:384
380 ; GCN-NEXT: buffer_store_dword v36, off, s[0:3], s33 offset:388
381 ; GCN-NEXT: buffer_store_dword v37, off, s[0:3], s33 offset:392
382 ; GCN-NEXT: buffer_store_dword v38, off, s[0:3], s33 offset:396
383 ; GCN-NEXT: buffer_store_dword v39, off, s[0:3], s33 offset:400
384 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:404
385 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:408
386 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:412
387 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:416
388 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:420
389 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:424
390 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:428
391 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:640 ; 4-byte Folded Reload
392 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:644 ; 4-byte Folded Reload
393 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:648 ; 4-byte Folded Reload
394 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:652 ; 4-byte Folded Reload
395 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:656 ; 4-byte Folded Reload
396 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:660 ; 4-byte Folded Reload
397 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:664 ; 4-byte Folded Reload
398 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:668 ; 4-byte Folded Reload
399 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:672 ; 4-byte Folded Reload
400 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:676 ; 4-byte Folded Reload
401 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:680 ; 4-byte Folded Reload
402 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:684 ; 4-byte Folded Reload
403 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:688 ; 4-byte Folded Reload
404 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:692 ; 4-byte Folded Reload
405 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:696 ; 4-byte Folded Reload
406 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:700 ; 4-byte Folded Reload
407 ; GCN-NEXT: v_bfe_u32 v0, v2, 1, 6
408 ; GCN-NEXT: v_lshlrev_b32_e32 v0, 2, v0
409 ; GCN-NEXT: v_and_b32_e32 v1, 1, v2
410 ; GCN-NEXT: v_lshlrev_b32_e32 v1, 4, v1
411 ; GCN-NEXT: s_waitcnt vmcnt(0)
412 ; GCN-NEXT: v_mov_b32_e32 v12, v15
413 ; GCN-NEXT: v_mov_b32_e32 v13, v16
414 ; GCN-NEXT: v_mov_b32_e32 v14, v17
415 ; GCN-NEXT: v_mov_b32_e32 v15, v18
416 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:432
417 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:436
418 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:440
419 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:444
420 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:576 ; 4-byte Folded Reload
421 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:580 ; 4-byte Folded Reload
422 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:584 ; 4-byte Folded Reload
423 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:588 ; 4-byte Folded Reload
424 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:592 ; 4-byte Folded Reload
425 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:596 ; 4-byte Folded Reload
426 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:600 ; 4-byte Folded Reload
427 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:604 ; 4-byte Folded Reload
428 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:608 ; 4-byte Folded Reload
429 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:612 ; 4-byte Folded Reload
430 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:616 ; 4-byte Folded Reload
431 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:620 ; 4-byte Folded Reload
432 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:624 ; 4-byte Folded Reload
433 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:628 ; 4-byte Folded Reload
434 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:632 ; 4-byte Folded Reload
435 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:636 ; 4-byte Folded Reload
436 ; GCN-NEXT: s_waitcnt vmcnt(0)
437 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:448
438 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:452
439 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:456
440 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:460
441 ; GCN-NEXT: buffer_load_dword v3, off, s[0:3], s33 offset:512 ; 4-byte Folded Reload
442 ; GCN-NEXT: buffer_load_dword v4, off, s[0:3], s33 offset:516 ; 4-byte Folded Reload
443 ; GCN-NEXT: buffer_load_dword v5, off, s[0:3], s33 offset:520 ; 4-byte Folded Reload
444 ; GCN-NEXT: buffer_load_dword v6, off, s[0:3], s33 offset:524 ; 4-byte Folded Reload
445 ; GCN-NEXT: buffer_load_dword v7, off, s[0:3], s33 offset:528 ; 4-byte Folded Reload
446 ; GCN-NEXT: buffer_load_dword v8, off, s[0:3], s33 offset:532 ; 4-byte Folded Reload
447 ; GCN-NEXT: buffer_load_dword v9, off, s[0:3], s33 offset:536 ; 4-byte Folded Reload
448 ; GCN-NEXT: buffer_load_dword v10, off, s[0:3], s33 offset:540 ; 4-byte Folded Reload
449 ; GCN-NEXT: buffer_load_dword v11, off, s[0:3], s33 offset:544 ; 4-byte Folded Reload
450 ; GCN-NEXT: buffer_load_dword v12, off, s[0:3], s33 offset:548 ; 4-byte Folded Reload
451 ; GCN-NEXT: buffer_load_dword v13, off, s[0:3], s33 offset:552 ; 4-byte Folded Reload
452 ; GCN-NEXT: buffer_load_dword v14, off, s[0:3], s33 offset:556 ; 4-byte Folded Reload
453 ; GCN-NEXT: buffer_load_dword v15, off, s[0:3], s33 offset:560 ; 4-byte Folded Reload
454 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:564 ; 4-byte Folded Reload
455 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:568 ; 4-byte Folded Reload
456 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:572 ; 4-byte Folded Reload
457 ; GCN-NEXT: s_waitcnt vmcnt(0)
458 ; GCN-NEXT: v_mov_b32_e32 v4, v7
459 ; GCN-NEXT: v_mov_b32_e32 v5, v8
460 ; GCN-NEXT: v_mov_b32_e32 v6, v9
461 ; GCN-NEXT: v_mov_b32_e32 v7, v10
462 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:464
463 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:468
464 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:472
465 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:476
466 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:480
467 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:484
468 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:488
469 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:492
470 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:496
471 ; GCN-NEXT: buffer_store_dword v60, off, s[0:3], s33 offset:500
472 ; GCN-NEXT: buffer_store_dword v61, off, s[0:3], s33 offset:504
473 ; GCN-NEXT: buffer_store_dword v62, off, s[0:3], s33 offset:508
474 ; GCN-NEXT: v_lshrrev_b32_e64 v7, 6, s33
475 ; GCN-NEXT: v_add_u32_e32 v7, 0x100, v7
476 ; GCN-NEXT: v_add_u32_e32 v0, v7, v0
477 ; GCN-NEXT: buffer_load_dword v0, v0, s[0:3], 0 offen
478 ; GCN-NEXT: buffer_load_dword v62, off, s[0:3], s33 ; 4-byte Folded Reload
479 ; GCN-NEXT: buffer_load_dword v61, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
480 ; GCN-NEXT: buffer_load_dword v60, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
481 ; GCN-NEXT: buffer_load_dword v59, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload
482 ; GCN-NEXT: buffer_load_dword v58, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload
483 ; GCN-NEXT: buffer_load_dword v57, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload
484 ; GCN-NEXT: buffer_load_dword v56, off, s[0:3], s33 offset:24 ; 4-byte Folded Reload
485 ; GCN-NEXT: buffer_load_dword v47, off, s[0:3], s33 offset:28 ; 4-byte Folded Reload
486 ; GCN-NEXT: buffer_load_dword v46, off, s[0:3], s33 offset:32 ; 4-byte Folded Reload
487 ; GCN-NEXT: buffer_load_dword v45, off, s[0:3], s33 offset:36 ; 4-byte Folded Reload
488 ; GCN-NEXT: buffer_load_dword v44, off, s[0:3], s33 offset:40 ; 4-byte Folded Reload
489 ; GCN-NEXT: buffer_load_dword v43, off, s[0:3], s33 offset:44 ; 4-byte Folded Reload
490 ; GCN-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:48 ; 4-byte Folded Reload
491 ; GCN-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:52 ; 4-byte Folded Reload
492 ; GCN-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:56 ; 4-byte Folded Reload
493 ; GCN-NEXT: s_mov_b32 s33, s4
494 ; GCN-NEXT: s_waitcnt vmcnt(15)
495 ; GCN-NEXT: v_lshrrev_b32_e32 v0, v1, v0
496 ; GCN-NEXT: s_waitcnt vmcnt(0)
497 ; GCN-NEXT: s_setpc_b64 s[30:31]
498 %vec = load <128 x i16>, <128 x i16> addrspace(1)* %ptr
499 %elt = extractelement <128 x i16> %vec, i32 %idx
503 define i64 @v_extract_v32i64_varidx(<32 x i64> addrspace(1)* %ptr, i32 %idx) {
504 ; GCN-LABEL: v_extract_v32i64_varidx:
506 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
507 ; GCN-NEXT: s_mov_b32 s4, s33
508 ; GCN-NEXT: s_add_i32 s33, s32, 0x3fc0
509 ; GCN-NEXT: s_and_b32 s33, s33, 0xffffc000
510 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:44 ; 4-byte Folded Spill
511 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:40 ; 4-byte Folded Spill
512 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:36 ; 4-byte Folded Spill
513 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:32 ; 4-byte Folded Spill
514 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:28 ; 4-byte Folded Spill
515 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:24 ; 4-byte Folded Spill
516 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill
517 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill
518 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill
519 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill
520 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill
521 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 ; 4-byte Folded Spill
522 ; GCN-NEXT: global_load_dwordx4 v[3:6], v[0:1], off
523 ; GCN-NEXT: global_load_dwordx4 v[7:10], v[0:1], off offset:16
524 ; GCN-NEXT: global_load_dwordx4 v[16:19], v[0:1], off offset:32
525 ; GCN-NEXT: global_load_dwordx4 v[20:23], v[0:1], off offset:48
526 ; GCN-NEXT: global_load_dwordx4 v[24:27], v[0:1], off offset:64
527 ; GCN-NEXT: global_load_dwordx4 v[28:31], v[0:1], off offset:80
528 ; GCN-NEXT: global_load_dwordx4 v[32:35], v[0:1], off offset:96
529 ; GCN-NEXT: global_load_dwordx4 v[36:39], v[0:1], off offset:112
530 ; GCN-NEXT: global_load_dwordx4 v[40:43], v[0:1], off offset:128
531 ; GCN-NEXT: global_load_dwordx4 v[44:47], v[0:1], off offset:144
532 ; GCN-NEXT: global_load_dwordx4 v[48:51], v[0:1], off offset:160
533 ; GCN-NEXT: global_load_dwordx4 v[52:55], v[0:1], off offset:176
534 ; GCN-NEXT: global_load_dwordx4 v[11:14], v[0:1], off offset:192
535 ; GCN-NEXT: s_add_i32 s32, s32, 0x10000
536 ; GCN-NEXT: s_add_i32 s32, s32, 0xffff0000
537 ; GCN-NEXT: s_waitcnt vmcnt(0)
538 ; GCN-NEXT: buffer_store_dword v11, off, s[0:3], s33 offset:576 ; 4-byte Folded Spill
539 ; GCN-NEXT: s_waitcnt vmcnt(0)
540 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:580 ; 4-byte Folded Spill
541 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:584 ; 4-byte Folded Spill
542 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:588 ; 4-byte Folded Spill
543 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:592 ; 4-byte Folded Spill
544 ; GCN-NEXT: buffer_store_dword v16, off, s[0:3], s33 offset:596 ; 4-byte Folded Spill
545 ; GCN-NEXT: buffer_store_dword v17, off, s[0:3], s33 offset:600 ; 4-byte Folded Spill
546 ; GCN-NEXT: buffer_store_dword v18, off, s[0:3], s33 offset:604 ; 4-byte Folded Spill
547 ; GCN-NEXT: buffer_store_dword v19, off, s[0:3], s33 offset:608 ; 4-byte Folded Spill
548 ; GCN-NEXT: buffer_store_dword v20, off, s[0:3], s33 offset:612 ; 4-byte Folded Spill
549 ; GCN-NEXT: buffer_store_dword v21, off, s[0:3], s33 offset:616 ; 4-byte Folded Spill
550 ; GCN-NEXT: buffer_store_dword v22, off, s[0:3], s33 offset:620 ; 4-byte Folded Spill
551 ; GCN-NEXT: buffer_store_dword v23, off, s[0:3], s33 offset:624 ; 4-byte Folded Spill
552 ; GCN-NEXT: buffer_store_dword v24, off, s[0:3], s33 offset:628 ; 4-byte Folded Spill
553 ; GCN-NEXT: buffer_store_dword v25, off, s[0:3], s33 offset:632 ; 4-byte Folded Spill
554 ; GCN-NEXT: buffer_store_dword v26, off, s[0:3], s33 offset:636 ; 4-byte Folded Spill
555 ; GCN-NEXT: global_load_dwordx4 v[11:14], v[0:1], off offset:208
556 ; GCN-NEXT: s_waitcnt vmcnt(0)
557 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:512 ; 4-byte Folded Spill
558 ; GCN-NEXT: s_waitcnt vmcnt(0)
559 ; GCN-NEXT: buffer_store_dword v8, off, s[0:3], s33 offset:516 ; 4-byte Folded Spill
560 ; GCN-NEXT: buffer_store_dword v9, off, s[0:3], s33 offset:520 ; 4-byte Folded Spill
561 ; GCN-NEXT: buffer_store_dword v10, off, s[0:3], s33 offset:524 ; 4-byte Folded Spill
562 ; GCN-NEXT: buffer_store_dword v11, off, s[0:3], s33 offset:528 ; 4-byte Folded Spill
563 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:532 ; 4-byte Folded Spill
564 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:536 ; 4-byte Folded Spill
565 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:540 ; 4-byte Folded Spill
566 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:544 ; 4-byte Folded Spill
567 ; GCN-NEXT: buffer_store_dword v16, off, s[0:3], s33 offset:548 ; 4-byte Folded Spill
568 ; GCN-NEXT: buffer_store_dword v17, off, s[0:3], s33 offset:552 ; 4-byte Folded Spill
569 ; GCN-NEXT: buffer_store_dword v18, off, s[0:3], s33 offset:556 ; 4-byte Folded Spill
570 ; GCN-NEXT: buffer_store_dword v19, off, s[0:3], s33 offset:560 ; 4-byte Folded Spill
571 ; GCN-NEXT: buffer_store_dword v20, off, s[0:3], s33 offset:564 ; 4-byte Folded Spill
572 ; GCN-NEXT: buffer_store_dword v21, off, s[0:3], s33 offset:568 ; 4-byte Folded Spill
573 ; GCN-NEXT: buffer_store_dword v22, off, s[0:3], s33 offset:572 ; 4-byte Folded Spill
574 ; GCN-NEXT: global_load_dwordx4 v[56:59], v[0:1], off offset:224
575 ; GCN-NEXT: global_load_dwordx4 v[12:15], v[0:1], off offset:240
576 ; GCN-NEXT: v_and_b32_e32 v0, 31, v2
577 ; GCN-NEXT: v_lshrrev_b32_e64 v2, 6, s33
578 ; GCN-NEXT: v_lshlrev_b32_e32 v0, 3, v0
579 ; GCN-NEXT: v_add_u32_e32 v2, 0x100, v2
580 ; GCN-NEXT: v_add_u32_e32 v1, v2, v0
581 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:256
582 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:260
583 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:264
584 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:268
585 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:272
586 ; GCN-NEXT: buffer_store_dword v8, off, s[0:3], s33 offset:276
587 ; GCN-NEXT: buffer_store_dword v9, off, s[0:3], s33 offset:280
588 ; GCN-NEXT: buffer_store_dword v10, off, s[0:3], s33 offset:284
589 ; GCN-NEXT: buffer_store_dword v16, off, s[0:3], s33 offset:288
590 ; GCN-NEXT: buffer_store_dword v17, off, s[0:3], s33 offset:292
591 ; GCN-NEXT: buffer_store_dword v18, off, s[0:3], s33 offset:296
592 ; GCN-NEXT: buffer_store_dword v19, off, s[0:3], s33 offset:300
593 ; GCN-NEXT: buffer_store_dword v20, off, s[0:3], s33 offset:304
594 ; GCN-NEXT: buffer_store_dword v21, off, s[0:3], s33 offset:308
595 ; GCN-NEXT: buffer_store_dword v22, off, s[0:3], s33 offset:312
596 ; GCN-NEXT: buffer_store_dword v23, off, s[0:3], s33 offset:316
597 ; GCN-NEXT: buffer_store_dword v24, off, s[0:3], s33 offset:320
598 ; GCN-NEXT: buffer_store_dword v25, off, s[0:3], s33 offset:324
599 ; GCN-NEXT: buffer_store_dword v26, off, s[0:3], s33 offset:328
600 ; GCN-NEXT: buffer_store_dword v27, off, s[0:3], s33 offset:332
601 ; GCN-NEXT: buffer_store_dword v28, off, s[0:3], s33 offset:336
602 ; GCN-NEXT: buffer_store_dword v29, off, s[0:3], s33 offset:340
603 ; GCN-NEXT: buffer_store_dword v30, off, s[0:3], s33 offset:344
604 ; GCN-NEXT: buffer_store_dword v31, off, s[0:3], s33 offset:348
605 ; GCN-NEXT: buffer_store_dword v32, off, s[0:3], s33 offset:352
606 ; GCN-NEXT: buffer_store_dword v33, off, s[0:3], s33 offset:356
607 ; GCN-NEXT: buffer_store_dword v34, off, s[0:3], s33 offset:360
608 ; GCN-NEXT: buffer_store_dword v35, off, s[0:3], s33 offset:364
609 ; GCN-NEXT: buffer_store_dword v36, off, s[0:3], s33 offset:368
610 ; GCN-NEXT: buffer_store_dword v37, off, s[0:3], s33 offset:372
611 ; GCN-NEXT: buffer_store_dword v38, off, s[0:3], s33 offset:376
612 ; GCN-NEXT: buffer_store_dword v39, off, s[0:3], s33 offset:380
613 ; GCN-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:384
614 ; GCN-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:388
615 ; GCN-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:392
616 ; GCN-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:396
617 ; GCN-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:400
618 ; GCN-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:404
619 ; GCN-NEXT: buffer_store_dword v46, off, s[0:3], s33 offset:408
620 ; GCN-NEXT: buffer_store_dword v47, off, s[0:3], s33 offset:412
621 ; GCN-NEXT: buffer_store_dword v48, off, s[0:3], s33 offset:416
622 ; GCN-NEXT: buffer_store_dword v49, off, s[0:3], s33 offset:420
623 ; GCN-NEXT: buffer_store_dword v50, off, s[0:3], s33 offset:424
624 ; GCN-NEXT: buffer_store_dword v51, off, s[0:3], s33 offset:428
625 ; GCN-NEXT: buffer_store_dword v52, off, s[0:3], s33 offset:432
626 ; GCN-NEXT: buffer_store_dword v53, off, s[0:3], s33 offset:436
627 ; GCN-NEXT: buffer_store_dword v54, off, s[0:3], s33 offset:440
628 ; GCN-NEXT: buffer_store_dword v55, off, s[0:3], s33 offset:444
629 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:576 ; 4-byte Folded Reload
630 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:580 ; 4-byte Folded Reload
631 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:584 ; 4-byte Folded Reload
632 ; GCN-NEXT: buffer_load_dword v19, off, s[0:3], s33 offset:588 ; 4-byte Folded Reload
633 ; GCN-NEXT: buffer_load_dword v20, off, s[0:3], s33 offset:592 ; 4-byte Folded Reload
634 ; GCN-NEXT: buffer_load_dword v21, off, s[0:3], s33 offset:596 ; 4-byte Folded Reload
635 ; GCN-NEXT: buffer_load_dword v22, off, s[0:3], s33 offset:600 ; 4-byte Folded Reload
636 ; GCN-NEXT: buffer_load_dword v23, off, s[0:3], s33 offset:604 ; 4-byte Folded Reload
637 ; GCN-NEXT: buffer_load_dword v24, off, s[0:3], s33 offset:608 ; 4-byte Folded Reload
638 ; GCN-NEXT: buffer_load_dword v25, off, s[0:3], s33 offset:612 ; 4-byte Folded Reload
639 ; GCN-NEXT: buffer_load_dword v26, off, s[0:3], s33 offset:616 ; 4-byte Folded Reload
640 ; GCN-NEXT: buffer_load_dword v27, off, s[0:3], s33 offset:620 ; 4-byte Folded Reload
641 ; GCN-NEXT: buffer_load_dword v28, off, s[0:3], s33 offset:624 ; 4-byte Folded Reload
642 ; GCN-NEXT: buffer_load_dword v29, off, s[0:3], s33 offset:628 ; 4-byte Folded Reload
643 ; GCN-NEXT: buffer_load_dword v30, off, s[0:3], s33 offset:632 ; 4-byte Folded Reload
644 ; GCN-NEXT: buffer_load_dword v31, off, s[0:3], s33 offset:636 ; 4-byte Folded Reload
645 ; GCN-NEXT: s_waitcnt vmcnt(0)
646 ; GCN-NEXT: v_mov_b32_e32 v3, v16
647 ; GCN-NEXT: v_mov_b32_e32 v4, v17
648 ; GCN-NEXT: v_mov_b32_e32 v5, v18
649 ; GCN-NEXT: v_mov_b32_e32 v6, v19
650 ; GCN-NEXT: buffer_store_dword v3, off, s[0:3], s33 offset:448
651 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:452
652 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:456
653 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:460
654 ; GCN-NEXT: buffer_load_dword v16, off, s[0:3], s33 offset:512 ; 4-byte Folded Reload
655 ; GCN-NEXT: buffer_load_dword v17, off, s[0:3], s33 offset:516 ; 4-byte Folded Reload
656 ; GCN-NEXT: buffer_load_dword v18, off, s[0:3], s33 offset:520 ; 4-byte Folded Reload
657 ; GCN-NEXT: buffer_load_dword v19, off, s[0:3], s33 offset:524 ; 4-byte Folded Reload
658 ; GCN-NEXT: buffer_load_dword v20, off, s[0:3], s33 offset:528 ; 4-byte Folded Reload
659 ; GCN-NEXT: buffer_load_dword v21, off, s[0:3], s33 offset:532 ; 4-byte Folded Reload
660 ; GCN-NEXT: buffer_load_dword v22, off, s[0:3], s33 offset:536 ; 4-byte Folded Reload
661 ; GCN-NEXT: buffer_load_dword v23, off, s[0:3], s33 offset:540 ; 4-byte Folded Reload
662 ; GCN-NEXT: buffer_load_dword v24, off, s[0:3], s33 offset:544 ; 4-byte Folded Reload
663 ; GCN-NEXT: buffer_load_dword v25, off, s[0:3], s33 offset:548 ; 4-byte Folded Reload
664 ; GCN-NEXT: buffer_load_dword v26, off, s[0:3], s33 offset:552 ; 4-byte Folded Reload
665 ; GCN-NEXT: buffer_load_dword v27, off, s[0:3], s33 offset:556 ; 4-byte Folded Reload
666 ; GCN-NEXT: buffer_load_dword v28, off, s[0:3], s33 offset:560 ; 4-byte Folded Reload
667 ; GCN-NEXT: buffer_load_dword v29, off, s[0:3], s33 offset:564 ; 4-byte Folded Reload
668 ; GCN-NEXT: buffer_load_dword v30, off, s[0:3], s33 offset:568 ; 4-byte Folded Reload
669 ; GCN-NEXT: buffer_load_dword v31, off, s[0:3], s33 offset:572 ; 4-byte Folded Reload
670 ; GCN-NEXT: s_waitcnt vmcnt(0)
671 ; GCN-NEXT: v_mov_b32_e32 v4, v20
672 ; GCN-NEXT: v_mov_b32_e32 v5, v21
673 ; GCN-NEXT: v_mov_b32_e32 v6, v22
674 ; GCN-NEXT: v_mov_b32_e32 v7, v23
675 ; GCN-NEXT: buffer_store_dword v4, off, s[0:3], s33 offset:464
676 ; GCN-NEXT: buffer_store_dword v5, off, s[0:3], s33 offset:468
677 ; GCN-NEXT: buffer_store_dword v6, off, s[0:3], s33 offset:472
678 ; GCN-NEXT: buffer_store_dword v7, off, s[0:3], s33 offset:476
679 ; GCN-NEXT: buffer_store_dword v56, off, s[0:3], s33 offset:480
680 ; GCN-NEXT: buffer_store_dword v57, off, s[0:3], s33 offset:484
681 ; GCN-NEXT: buffer_store_dword v58, off, s[0:3], s33 offset:488
682 ; GCN-NEXT: buffer_store_dword v59, off, s[0:3], s33 offset:492
683 ; GCN-NEXT: buffer_store_dword v12, off, s[0:3], s33 offset:496
684 ; GCN-NEXT: buffer_store_dword v13, off, s[0:3], s33 offset:500
685 ; GCN-NEXT: buffer_store_dword v14, off, s[0:3], s33 offset:504
686 ; GCN-NEXT: buffer_store_dword v15, off, s[0:3], s33 offset:508
687 ; GCN-NEXT: buffer_load_dword v0, v1, s[0:3], 0 offen
688 ; GCN-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen offset:4
689 ; GCN-NEXT: buffer_load_dword v59, off, s[0:3], s33 ; 4-byte Folded Reload
690 ; GCN-NEXT: buffer_load_dword v58, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload
691 ; GCN-NEXT: buffer_load_dword v57, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload
692 ; GCN-NEXT: buffer_load_dword v56, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload
693 ; GCN-NEXT: buffer_load_dword v47, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload
694 ; GCN-NEXT: buffer_load_dword v46, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload
695 ; GCN-NEXT: buffer_load_dword v45, off, s[0:3], s33 offset:24 ; 4-byte Folded Reload
696 ; GCN-NEXT: buffer_load_dword v44, off, s[0:3], s33 offset:28 ; 4-byte Folded Reload
697 ; GCN-NEXT: buffer_load_dword v43, off, s[0:3], s33 offset:32 ; 4-byte Folded Reload
698 ; GCN-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:36 ; 4-byte Folded Reload
699 ; GCN-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:40 ; 4-byte Folded Reload
700 ; GCN-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:44 ; 4-byte Folded Reload
701 ; GCN-NEXT: s_mov_b32 s33, s4
702 ; GCN-NEXT: s_waitcnt vmcnt(0)
703 ; GCN-NEXT: s_setpc_b64 s[30:31]
704 %vec = load <32 x i64>, <32 x i64> addrspace(1)* %ptr
705 %elt = extractelement <32 x i64> %vec, i32 %idx