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, 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), 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, 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, 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, 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, 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), align 4, 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, 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), 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, 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, implicit $exec :: (dereferenceable invariant load (s128))
131 %8:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 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, 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, 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, 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_zero_not_merged
176 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 0, 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, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
179 name: image_load_dmask_zero_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, implicit $exec :: (dereferenceable invariant load (s128))
188 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sgpr_256, 0, 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, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
193 # GFX9-LABEL: name: image_load_dmask_not_disjoint_not_merged
194 # 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)
195 # 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)
197 name: image_load_dmask_not_disjoint_not_merged
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:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
206 %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)
207 %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)
211 # GFX9-LABEL: name: image_load_not_merged_0
212 # 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)
213 # 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)
215 name: image_load_not_merged_0
218 %0:sgpr_64 = COPY $sgpr0_sgpr1
219 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
220 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
221 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
222 %4:vgpr_32 = COPY %2.sub3
223 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
224 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 1, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
225 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
226 %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)
230 # GFX9-LABEL: name: image_load_not_merged_1
231 # 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)
232 # 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)
234 name: image_load_not_merged_1
237 %0:sgpr_64 = COPY $sgpr0_sgpr1
238 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
239 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
240 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
241 %4:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
242 %5:vgpr_32 = COPY %2.sub3
243 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
244 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %6, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
245 %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)
249 # GFX9-LABEL: name: image_load_not_merged_10
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, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
253 name: image_load_not_merged_10
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, 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, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
267 # GFX9-LABEL: name: image_load_not_merged_3
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_3
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, 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_4
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, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
289 name: image_load_not_merged_4
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, 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, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
303 # GFX9-LABEL: name: image_load_not_merged_5
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, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
307 name: image_load_not_merged_5
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, 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, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s96), align 16, addrspace 4)
321 # GFX9-LABEL: name: image_load_not_merged_6
322 # 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)
323 # 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)
325 name: image_load_not_merged_6
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, implicit $exec :: (dereferenceable invariant load (s128))
334 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
335 %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)
339 # GFX9-LABEL: name: image_load_not_merged_7
340 # 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)
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_7
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, implicit $exec :: (dereferenceable invariant load (s128))
352 %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)
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_8
358 # 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)
359 # 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)
361 name: image_load_not_merged_8
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, implicit $exec :: (dereferenceable invariant load (s128))
370 %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)
371 %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)
375 # GFX9-LABEL: name: image_load_not_merged_9
376 # 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)
377 # 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)
379 name: image_load_not_merged_9
382 %0:sgpr_64 = COPY $sgpr0_sgpr1
383 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
384 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
385 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
386 %4:vgpr_32 = COPY %2.sub3
387 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
388 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load (s32), addrspace 4)
389 %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)
393 # GFX9-LABEL: name: image_load_mip_merged_v1v3
394 # 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)
395 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
396 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
398 name: image_load_mip_merged_v1v3
401 %0:sgpr_64 = COPY $sgpr0_sgpr1
402 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
403 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
404 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
405 %4:vgpr_32 = COPY %2.sub3
406 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
407 %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)
408 %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)
412 # GFX9-LABEL: name: image_load_mip_pck_merged_v1v3
413 # 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)
414 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
415 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
417 name: image_load_mip_pck_merged_v1v3
420 %0:sgpr_64 = COPY $sgpr0_sgpr1
421 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
422 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
423 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
424 %4:vgpr_32 = COPY %2.sub3
425 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
426 %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)
427 %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)
431 # GFX9-LABEL: name: image_load_mip_pck_sgn_merged_v1v3
432 # 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)
433 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
434 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
436 name: image_load_mip_pck_sgn_merged_v1v3
439 %0:sgpr_64 = COPY $sgpr0_sgpr1
440 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
441 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
442 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
443 %4:vgpr_32 = COPY %2.sub3
444 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
445 %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)
446 %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)
450 # GFX9-LABEL: name: image_load_pck_merged_v1v3
451 # 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)
452 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
453 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
455 name: image_load_pck_merged_v1v3
458 %0:sgpr_64 = COPY $sgpr0_sgpr1
459 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
460 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
461 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
462 %4:vgpr_32 = COPY %2.sub3
463 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
464 %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)
465 %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)
469 # GFX9-LABEL: name: image_load_pck_sgn_merged_v1v3
470 # 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)
471 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
472 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
474 name: image_load_pck_sgn_merged_v1v3
477 %0:sgpr_64 = COPY $sgpr0_sgpr1
478 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0
479 %2:sgpr_128 = COPY $sgpr96_sgpr97_sgpr98_sgpr99
480 %3:sgpr_256 = S_LOAD_DWORDX8_IMM %1, 208, 0
481 %4:vgpr_32 = COPY %2.sub3
482 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load (s128))
483 %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)
484 %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)