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, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, 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, 0
13 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
14 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
15 %4:vgpr_32 = COPY %2.sub3
16 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
17 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
18 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
21 # GFX9-LABEL: name: image_load_merged_v1v3_reversed
22 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
23 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub3
24 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub0_sub1_sub2
26 name: image_load_merged_v1v3_reversed
29 %0:sgpr_64 = COPY $sgpr0_sgpr1
30 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
31 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
32 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
33 %4:vgpr_32 = COPY %2.sub3
34 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
35 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
36 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
40 # GFX9-LABEL: name: image_load_merged_v2v2
41 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, addrspace 4)
42 # GFX9: %{{[0-9]+}}:vreg_64 = COPY %8.sub0_sub1
43 # GFX9: %{{[0-9]+}}:vreg_64 = COPY killed %8.sub2_sub3
45 name: image_load_merged_v2v2
48 %0:sgpr_64 = COPY $sgpr0_sgpr1
49 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
50 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
51 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
52 %4:vgpr_32 = COPY %2.sub3
53 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
54 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sreg_256, 3, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
55 %7:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sreg_256, 12, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
59 # GFX9-LABEL: name: image_load_merged_v2v2_reversed
60 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, addrspace 4)
61 # GFX9: %{{[0-9]+}}:vreg_64 = COPY %8.sub2_sub3
62 # GFX9: %{{[0-9]+}}:vreg_64 = COPY killed %8.sub0_sub1
64 name: image_load_merged_v2v2_reversed
67 %0:sgpr_64 = COPY $sgpr0_sgpr1
68 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
69 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
70 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
71 %4:vgpr_32 = COPY %2.sub3
72 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
73 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sreg_256, 12, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
74 %7:vreg_64 = IMAGE_LOAD_V2_V4 %5:vreg_128, %3:sreg_256, 3, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
78 # GFX9-LABEL: name: image_load_merged_v3v1
79 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, addrspace 4)
80 # GFX9: %{{[0-9]+}}:vreg_96 = COPY %8.sub0_sub1_sub2
81 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY killed %8.sub3
83 name: image_load_merged_v3v1
86 %0:sgpr_64 = COPY $sgpr0_sgpr1
87 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
88 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
89 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
90 %4:vgpr_32 = COPY %2.sub3
91 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
92 %6:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
93 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
97 # GFX9-LABEL: name: image_load_merged_v3v1_reversed
98 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, addrspace 4)
99 # GFX9: %{{[0-9]+}}:vreg_96 = COPY %8.sub1_sub2_sub3
100 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY killed %8.sub0
102 name: image_load_merged_v3v1_reversed
105 %0:sgpr_64 = COPY $sgpr0_sgpr1
106 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
107 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
108 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
109 %4:vgpr_32 = COPY %2.sub3
110 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
111 %6:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
112 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
116 # GFX9-LABEL: name: image_load_divided_merged
117 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
119 name: image_load_divided_merged
122 %0:sgpr_64 = COPY $sgpr0_sgpr1
123 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
124 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
125 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
126 %4:vgpr_32 = COPY %2.sub3
127 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
128 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
129 %7:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
130 %8:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
131 %9:vreg_96 = IMAGE_LOAD_V3_V4 %7:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
132 %10:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
133 %11:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
137 # GFX9-LABEL: name: image_load_divided_not_merged
138 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
139 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
141 name: image_load_divided_not_merged
144 %0:sgpr_64 = COPY $sgpr0_sgpr1
145 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
146 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
147 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
148 %4:vreg_128 = COPY %2
149 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
150 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
151 IMAGE_STORE_V4_V4 %4:vreg_128, %5:vreg_128, %3:sreg_256, 15, -1, 0, 0, 0, 0, 0, 0, 0, implicit $exec
152 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
156 # GFX9-LABEL: name: image_load_dmask_overlapped_not_merged
157 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 4, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
158 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
160 name: image_load_dmask_overlapped_not_merged
163 %0:sgpr_64 = COPY $sgpr0_sgpr1
164 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
165 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
166 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
167 %4:vgpr_32 = COPY %2.sub3
168 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
169 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 4, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
170 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
174 # GFX9-LABEL: name: image_load_dmask_not_disjoint_not_merged
175 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 4, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
176 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 11, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
178 name: image_load_dmask_not_disjoint_not_merged
181 %0:sgpr_64 = COPY $sgpr0_sgpr1
182 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
183 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
184 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
185 %4:vgpr_32 = COPY %2.sub3
186 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
187 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5:vreg_128, %3:sreg_256, 4, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
188 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5:vreg_128, %3:sreg_256, 11, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
192 # GFX9-LABEL: name: image_load_not_merged_0
193 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
194 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %6, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
196 name: image_load_not_merged_0
199 %0:sgpr_64 = COPY $sgpr0_sgpr1
200 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
201 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
202 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
203 %4:vgpr_32 = COPY %2.sub3
204 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
205 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 1, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
206 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
207 %8:vreg_96 = IMAGE_LOAD_V3_V4 %6, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
211 # GFX9-LABEL: name: image_load_not_merged_1
212 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %6, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
213 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %6, %4, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
215 name: image_load_not_merged_1
218 %0:sgpr_64 = COPY $sgpr0_sgpr1
219 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
220 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
221 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
222 %4:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
223 %5:vgpr_32 = COPY %2.sub3
224 %6:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
225 %7:vgpr_32 = IMAGE_LOAD_V1_V4 %6, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
226 %8:vreg_96 = IMAGE_LOAD_V3_V4 %6, %4, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
230 # GFX9-LABEL: name: image_load_not_merged_10
231 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
232 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
234 name: image_load_not_merged_10
237 %0:sgpr_64 = COPY $sgpr0_sgpr1
238 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
239 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
240 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
241 %4:vgpr_32 = COPY %2.sub3
242 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
243 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
244 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
248 # GFX9-LABEL: name: image_load_not_merged_3
249 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
250 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
252 name: image_load_not_merged_3
255 %0:sgpr_64 = COPY $sgpr0_sgpr1
256 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
257 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
258 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
259 %4:vgpr_32 = COPY %2.sub3
260 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
261 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
262 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 1, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
266 # GFX9-LABEL: name: image_load_not_merged_4
267 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
268 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
270 name: image_load_not_merged_4
273 %0:sgpr_64 = COPY $sgpr0_sgpr1
274 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
275 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
276 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
277 %4:vgpr_32 = COPY %2.sub3
278 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
279 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
280 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 1, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
284 # GFX9-LABEL: name: image_load_not_merged_5
285 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
286 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
288 name: image_load_not_merged_5
291 %0:sgpr_64 = COPY $sgpr0_sgpr1
292 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
293 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
294 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
295 %4:vgpr_32 = COPY %2.sub3
296 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
297 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
298 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 1, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
302 # GFX9-LABEL: name: image_load_not_merged_6
303 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
304 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 1, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
306 name: image_load_not_merged_6
309 %0:sgpr_64 = COPY $sgpr0_sgpr1
310 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
311 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
312 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
313 %4:vgpr_32 = COPY %2.sub3
314 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
315 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
316 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 1, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
320 # GFX9-LABEL: name: image_load_not_merged_7
321 # GFX9: %{{[0-9]+}}:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 1, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
322 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
324 name: image_load_not_merged_7
327 %0:sgpr_64 = COPY $sgpr0_sgpr1
328 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
329 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
330 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
331 %4:vgpr_32 = COPY %2.sub3
332 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
333 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 1, 0, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
334 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
338 # GFX9-LABEL: name: image_load_not_merged_8
339 # GFX9: %{{[0-9]+}}:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 0, 1, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
340 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
342 name: image_load_not_merged_8
345 %0:sgpr_64 = COPY $sgpr0_sgpr1
346 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
347 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
348 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
349 %4:vgpr_32 = COPY %2.sub3
350 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
351 %6:vreg_64 = IMAGE_LOAD_V2_V4 %5, %3, 8, 0, 0, 0, 0, 0, 1, -1, 0, implicit $exec :: (dereferenceable load 8, align 16, addrspace 4)
352 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
356 # GFX9-LABEL: name: image_load_not_merged_9
357 # GFX9: %{{[0-9]+}}:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
358 # GFX9: %{{[0-9]+}}:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
360 name: image_load_not_merged_9
363 %0:sgpr_64 = COPY $sgpr0_sgpr1
364 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
365 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
366 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
367 %4:vgpr_32 = COPY %2.sub3
368 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
369 %6:vgpr_32 = IMAGE_LOAD_V1_V4 %5, %3, 8, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
370 %7:vreg_96 = IMAGE_LOAD_V3_V4 %5, %3, 7, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
374 # GFX9-LABEL: name: image_load_mip_merged_v1v3
375 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
376 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
377 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
379 name: image_load_mip_merged_v1v3
382 %0:sgpr_64 = COPY $sgpr0_sgpr1
383 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
384 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
385 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
386 %4:vgpr_32 = COPY %2.sub3
387 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
388 %6:vgpr_32 = IMAGE_LOAD_MIP_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 4, addrspace 4)
389 %7:vreg_96 = IMAGE_LOAD_MIP_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, 0, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
395 # GFX9-LABEL: name: image_load_mip_pck_merged_v1v3
396 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_PCK_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
397 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
398 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
400 name: image_load_mip_pck_merged_v1v3
403 %0:sgpr_64 = COPY $sgpr0_sgpr1
404 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
405 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
406 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
407 %4:vgpr_32 = COPY %2.sub3
408 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
409 %6:vgpr_32 = IMAGE_LOAD_MIP_PCK_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 4, addrspace 4)
410 %7:vreg_96 = IMAGE_LOAD_MIP_PCK_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
416 # GFX9-LABEL: name: image_load_mip_pck_sgn_merged_v1v3
417 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_MIP_PCK_SGN_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
418 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
419 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
421 name: image_load_mip_pck_sgn_merged_v1v3
424 %0:sgpr_64 = COPY $sgpr0_sgpr1
425 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
426 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
427 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
428 %4:vgpr_32 = COPY %2.sub3
429 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
430 %6:vgpr_32 = IMAGE_LOAD_MIP_PCK_SGN_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 4, addrspace 4)
431 %7:vreg_96 = IMAGE_LOAD_MIP_PCK_SGN_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
435 # GFX9-LABEL: name: image_load_pck_merged_v1v3
436 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_PCK_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
437 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
438 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
440 name: image_load_pck_merged_v1v3
443 %0:sgpr_64 = COPY $sgpr0_sgpr1
444 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
445 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
446 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
447 %4:vgpr_32 = COPY %2.sub3
448 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
449 %6:vgpr_32 = IMAGE_LOAD_PCK_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 4, addrspace 4)
450 %7:vreg_96 = IMAGE_LOAD_PCK_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)
454 # GFX9-LABEL: name: image_load_pck_sgn_merged_v1v3
455 # GFX9: %{{[0-9]+}}:vreg_128 = IMAGE_LOAD_PCK_SGN_V4_V4 %5, %3, 15, 0, 0, 0, 0, 0, 0, -1, implicit $exec, implicit $exec :: (dereferenceable load 16, align 4, addrspace 4)
456 # GFX9: %{{[0-9]+}}:vgpr_32 = COPY %8.sub0
457 # GFX9: %{{[0-9]+}}:vreg_96 = COPY killed %8.sub1_sub2_sub3
459 name: image_load_pck_sgn_merged_v1v3
462 %0:sgpr_64 = COPY $sgpr0_sgpr1
463 %1:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 36, 0, 0
464 %2:sgpr_128 =COPY $sgpr96_sgpr97_sgpr98_sgpr99
465 %3:sreg_256 = S_LOAD_DWORDX8_IMM %1, 208, 0, 0
466 %4:vgpr_32 = COPY %2.sub3
467 %5:vreg_128 = BUFFER_LOAD_DWORDX4_OFFSET %2:sgpr_128, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 16)
468 %6:vgpr_32 = IMAGE_LOAD_PCK_SGN_V1_V4 %5:vreg_128, %3:sreg_256, 1, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 4, addrspace 4)
469 %7:vreg_96 = IMAGE_LOAD_PCK_SGN_V3_V4 %5:vreg_128, %3:sreg_256, 14, 0, 0, 0, 0, 0, 0, -1, implicit $exec :: (dereferenceable load 12, align 16, addrspace 4)