1 # RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-load-store-opt -o - %s | FileCheck -check-prefix=GFX9 %s
3 # GFX9-LABEL: name: image_load_merged_v1v3
4 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
5 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
6 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
8 name: image_load_merged_v1v3
11 %0:sgpr_64 = COPY $sgpr0_sgpr1
12 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
13 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
14 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
15 %4:vgpr_32 = COPY %2.sub3
16 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
17 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
18 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
22 # GFX9-LABEL: name: image_load_merged_v1v3_reversed
23 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
24 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub3
25 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub0_sub1_sub2
27 name: image_load_merged_v1v3_reversed
30 %0:sgpr_64 = COPY $sgpr0_sgpr1
31 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
32 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
33 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
34 %4:vgpr_32 = COPY %2.sub3
35 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
36 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
37 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
41 # GFX9-LABEL: name: image_load_merged_v2v2
42 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), addrspace 4)
43 # GFX9: %{{[0-9]+}}:vreg_64 = COPY %8.sub0_sub1
44 # GFX9: %{{[0-9]+}}:vreg_64 = COPY killed %8.sub2_sub3
46 name: image_load_merged_v2v2
49 %0:sgpr_64 = COPY $sgpr0_sgpr1
50 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
51 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
52 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
53 %4:vgpr_32 = COPY %2.sub3
54 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
55 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sgpr_256, 3, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
56 %7:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sgpr_256, 12, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
60 # GFX9-LABEL: name: image_load_merged_v2v2_reversed
61 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), addrspace 4)
62 # GFX9: %{{[0-9]+}}:vreg_64 = COPY %8.sub2_sub3
63 # GFX9: %{{[0-9]+}}:vreg_64 = COPY killed %8.sub0_sub1
65 name: image_load_merged_v2v2_reversed
68 %0:sgpr_64 = COPY $sgpr0_sgpr1
69 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
70 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
71 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
72 %4:vgpr_32 = COPY %2.sub3
73 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
74 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sgpr_256, 12, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
75 %7:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sgpr_256, 3, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
79 # GFX9-LABEL: name: image_load_merged_v3v1
80 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), addrspace 4)
81 # GFX9: %{{[0-9]+}}:vreg_96 = COPY %8.sub0_sub1_sub2
82 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY killed %8.sub3
84 name: image_load_merged_v3v1
87 %0:sgpr_64 = COPY $sgpr0_sgpr1
88 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
89 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
90 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
91 %4:vgpr_32 = COPY %2.sub3
92 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
93 %6:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
94 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
98 # GFX9-LABEL: name: image_load_merged_v3v1_reversed
99 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), addrspace 4)
100 # GFX9: %{{[0-9]+}}:vreg_96 = COPY %8.sub1_sub2_sub3
101 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY killed %8.sub0
103 name: image_load_merged_v3v1_reversed
106 %0:sgpr_64 = COPY $sgpr0_sgpr1
107 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
108 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
109 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
110 %4:vgpr_32 = COPY %2.sub3
111 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
112 %6:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
113 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
117 # GFX9-LABEL: name: image_load_divided_merged
118 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
120 name: image_load_divided_merged
123 %0:sgpr_64 = COPY $sgpr0_sgpr1
124 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
125 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
126 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
127 %4:vgpr_32 = COPY %2.sub3
128 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
129 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
130 %7:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
131 %8:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
132 %9:vreg_96 = IMAGE_LOAD_V3_V4 %7:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
133 %10:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
134 %11:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
138 # GFX9-LABEL: name: image_load_divided_not_merged
139 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
140 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
142 name: image_load_divided_not_merged
145 %0:sgpr_64 = COPY $sgpr0_sgpr1
146 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
147 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
148 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
149 %4:vreg_128 = COPY %2
150 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
151 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
152 IMAGE_STORE_V4_V4 %4:vreg_128, %5:vreg_128, %3:sgpr_256, 15, -1, 0, 0, 0, 0, 0, 0, implicit $exec :: (store (s128))
153 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
157 # GFX9-LABEL: name: image_load_dmask_overlapped_not_merged
158 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 4, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
159 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
161 name: image_load_dmask_overlapped_not_merged
164 %0:sgpr_64 = COPY $sgpr0_sgpr1
165 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
166 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
167 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
168 %4:vgpr_32 = COPY %2.sub3
169 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
170 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 4, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
171 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
175 # GFX9-LABEL: name: image_load_dmask_not_disjoint_not_merged
176 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 4, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
177 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 11, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
179 name: image_load_dmask_not_disjoint_not_merged
182 %0:sgpr_64 = COPY $sgpr0_sgpr1
183 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
184 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
185 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
186 %4:vgpr_32 = COPY %2.sub3
187 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
188 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 4, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
189 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sgpr_256, 11, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
193 # GFX9-LABEL: name: image_load_not_merged_0
194 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
195 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %6, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
197 name: image_load_not_merged_0
200 %0:sgpr_64 = COPY $sgpr0_sgpr1
201 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
202 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
203 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
204 %4:vgpr_32 = COPY %2.sub3
205 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
206 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 1, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
207 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
208 %8:vreg_96 = IMAGE_LOAD_V3_V4 %6, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
212 # GFX9-LABEL: name: image_load_not_merged_1
213 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %6, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
214 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %6, %4, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
216 name: image_load_not_merged_1
219 %0:sgpr_64 = COPY $sgpr0_sgpr1
220 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
221 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
222 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
223 %4:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
224 %5:vgpr_32 = COPY %2.sub3
225 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
226 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %6, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
227 %8:vreg_96 = IMAGE_LOAD_V3_V4 %6, %4, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
231 # GFX9-LABEL: name: image_load_not_merged_10
232 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
233 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
235 name: image_load_not_merged_10
238 %0:sgpr_64 = COPY $sgpr0_sgpr1
239 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
240 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
241 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
242 %4:vgpr_32 = COPY %2.sub3
243 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
244 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
245 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
249 # GFX9-LABEL: name: image_load_not_merged_3
250 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
251 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
253 name: image_load_not_merged_3
256 %0:sgpr_64 = COPY $sgpr0_sgpr1
257 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
258 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
259 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
260 %4:vgpr_32 = COPY %2.sub3
261 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
262 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
263 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
267 # GFX9-LABEL: name: image_load_not_merged_4
268 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
269 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
271 name: image_load_not_merged_4
274 %0:sgpr_64 = COPY $sgpr0_sgpr1
275 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
276 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
277 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
278 %4:vgpr_32 = COPY %2.sub3
279 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
280 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
281 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
285 # GFX9-LABEL: name: image_load_not_merged_5
286 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
287 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
289 name: image_load_not_merged_5
292 %0:sgpr_64 = COPY $sgpr0_sgpr1
293 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
294 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
295 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
296 %4:vgpr_32 = COPY %2.sub3
297 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
298 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
299 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
303 # GFX9-LABEL: name: image_load_not_merged_6
304 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
305 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 1, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
307 name: image_load_not_merged_6
310 %0:sgpr_64 = COPY $sgpr0_sgpr1
311 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
312 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
313 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
314 %4:vgpr_32 = COPY %2.sub3
315 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
316 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
317 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 1, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
321 # GFX9-LABEL: name: image_load_not_merged_7
322 # GFX9: %{{[0-9]+}}:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 1, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
323 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
325 name: image_load_not_merged_7
328 %0:sgpr_64 = COPY $sgpr0_sgpr1
329 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
330 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
331 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
332 %4:vgpr_32 = COPY %2.sub3
333 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
334 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 1, 0, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
335 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
339 # GFX9-LABEL: name: image_load_not_merged_8
340 # GFX9: %{{[0-9]+}}:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 1, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
341 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
343 name: image_load_not_merged_8
346 %0:sgpr_64 = COPY $sgpr0_sgpr1
347 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
348 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
349 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
350 %4:vgpr_32 = COPY %2.sub3
351 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
352 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 1, -1, 0, implicit $exec :: (dereferenceable load (s64), align 16, addrspace 4)
353 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
357 # GFX9-LABEL: name: image_load_not_merged_9
358 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
359 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
361 name: image_load_not_merged_9
364 %0:sgpr_64 = COPY $sgpr0_sgpr1
365 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
366 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
367 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
368 %4:vgpr_32 = COPY %2.sub3
369 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
370 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
371 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
375 # GFX9-LABEL: name: image_load_mip_merged_v1v3
376 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
377 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
378 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
380 name: image_load_mip_merged_v1v3
383 %0:sgpr_64 = COPY $sgpr0_sgpr1
384 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
385 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
386 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
387 %4:vgpr_32 = COPY %2.sub3
388 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
389 %6:vgpr_32 = IMAGE_LOAD_MIP_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
390 %7:vreg_96 = IMAGE_LOAD_MIP_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
394 # GFX9-LABEL: name: image_load_mip_pck_merged_v1v3
395 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_PCK_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
396 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
397 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
399 name: image_load_mip_pck_merged_v1v3
402 %0:sgpr_64 = COPY $sgpr0_sgpr1
403 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
404 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
405 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
406 %4:vgpr_32 = COPY %2.sub3
407 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
408 %6:vgpr_32 = IMAGE_LOAD_MIP_PCK_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s32), addrspace 4)
409 %7:vreg_96 = IMAGE_LOAD_MIP_PCK_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
413 # GFX9-LABEL: name: image_load_mip_pck_sgn_merged_v1v3
414 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_PCK_SGN_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
415 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
416 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
418 name: image_load_mip_pck_sgn_merged_v1v3
421 %0:sgpr_64 = COPY $sgpr0_sgpr1
422 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
423 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
424 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
425 %4:vgpr_32 = COPY %2.sub3
426 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
427 %6:vgpr_32 = IMAGE_LOAD_MIP_PCK_SGN_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s32), addrspace 4)
428 %7:vreg_96 = IMAGE_LOAD_MIP_PCK_SGN_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
432 # GFX9-LABEL: name: image_load_pck_merged_v1v3
433 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_PCK_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
434 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
435 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
437 name: image_load_pck_merged_v1v3
440 %0:sgpr_64 = COPY $sgpr0_sgpr1
441 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
442 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
443 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
444 %4:vgpr_32 = COPY %2.sub3
445 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
446 %6:vgpr_32 = IMAGE_LOAD_PCK_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s32), addrspace 4)
447 %7:vreg_96 = IMAGE_LOAD_PCK_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
451 # GFX9-LABEL: name: image_load_pck_sgn_merged_v1v3
452 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_PCK_SGN_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load (s128), align 4, addrspace 4)
453 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
454 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
456 name: image_load_pck_sgn_merged_v1v3
459 %0:sgpr_64 = COPY $sgpr0_sgpr1
460 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
461 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
462 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
463 %4:vgpr_32 = COPY %2.sub3
464 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
465 %6:vgpr_32 = IMAGE_LOAD_PCK_SGN_V1_V4 %5:vreg_128, %3:sgpr_256, 1, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s32), addrspace 4)
466 %7:vreg_96 = IMAGE_LOAD_PCK_SGN_V3_V4 %5:vreg_128, %3:sgpr_256, 14, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)