1 ; RUN: llc -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -amdgpu-scalarize-global-loads=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,VI,MESA %s
2 ; RUN: llc -march=amdgcn -mcpu=hawaii -amdgpu-scalarize-global-loads=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,CI,MESA %s
3 ; RUN: llc -march=amdgcn -mcpu=gfx900 -mattr=-flat-for-global -amdgpu-scalarize-global-loads=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,GFX9,VI,MESA %s
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -mattr=-flat-for-global -amdgpu-scalarize-global-loads=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,VI,HSA %s
6 declare hidden void @external_void_func_i1(i1) #0
7 declare hidden void @external_void_func_i1_signext(i1 signext) #0
8 declare hidden void @external_void_func_i1_zeroext(i1 zeroext) #0
10 declare hidden void @external_void_func_i8(i8) #0
11 declare hidden void @external_void_func_i8_signext(i8 signext) #0
12 declare hidden void @external_void_func_i8_zeroext(i8 zeroext) #0
14 declare hidden void @external_void_func_i16(i16) #0
15 declare hidden void @external_void_func_i16_signext(i16 signext) #0
16 declare hidden void @external_void_func_i16_zeroext(i16 zeroext) #0
18 declare hidden void @external_void_func_i32(i32) #0
19 declare hidden void @external_void_func_i64(i64) #0
20 declare hidden void @external_void_func_v2i64(<2 x i64>) #0
21 declare hidden void @external_void_func_v3i64(<3 x i64>) #0
22 declare hidden void @external_void_func_v4i64(<4 x i64>) #0
24 declare hidden void @external_void_func_f16(half) #0
25 declare hidden void @external_void_func_f32(float) #0
26 declare hidden void @external_void_func_f64(double) #0
27 declare hidden void @external_void_func_v2f32(<2 x float>) #0
28 declare hidden void @external_void_func_v2f64(<2 x double>) #0
29 declare hidden void @external_void_func_v3f32(<3 x float>) #0
30 declare hidden void @external_void_func_v3f64(<3 x double>) #0
31 declare hidden void @external_void_func_v5f32(<5 x float>) #0
33 declare hidden void @external_void_func_v2i16(<2 x i16>) #0
34 declare hidden void @external_void_func_v2f16(<2 x half>) #0
35 declare hidden void @external_void_func_v3i16(<3 x i16>) #0
36 declare hidden void @external_void_func_v3f16(<3 x half>) #0
37 declare hidden void @external_void_func_v4i16(<4 x i16>) #0
38 declare hidden void @external_void_func_v4f16(<4 x half>) #0
40 declare hidden void @external_void_func_v2i32(<2 x i32>) #0
41 declare hidden void @external_void_func_v3i32(<3 x i32>) #0
42 declare hidden void @external_void_func_v3i32_i32(<3 x i32>, i32) #0
43 declare hidden void @external_void_func_v4i32(<4 x i32>) #0
44 declare hidden void @external_void_func_v5i32(<5 x i32>) #0
45 declare hidden void @external_void_func_v8i32(<8 x i32>) #0
46 declare hidden void @external_void_func_v16i32(<16 x i32>) #0
47 declare hidden void @external_void_func_v32i32(<32 x i32>) #0
48 declare hidden void @external_void_func_v32i32_i32(<32 x i32>, i32) #0
50 ; return value and argument
51 declare hidden i32 @external_i32_func_i32(i32) #0
54 declare hidden void @external_void_func_struct_i8_i32({ i8, i32 }) #0
55 declare hidden void @external_void_func_byval_struct_i8_i32({ i8, i32 } addrspace(5)* byval({ i8, i32 })) #0
56 declare hidden void @external_void_func_sret_struct_i8_i32_byval_struct_i8_i32({ i8, i32 } addrspace(5)* sret({ i8, i32 }), { i8, i32 } addrspace(5)* byval({ i8, i32 })) #0
58 declare hidden void @external_void_func_v16i8(<16 x i8>) #0
61 ; FIXME: Should be passing -1
62 ; GCN-LABEL: {{^}}test_call_external_void_func_i1_imm:
63 ; MESA: s_mov_b32 s36, SCRATCH_RSRC_DWORD
65 ; MESA-DAG: s_mov_b64 s[0:1], s[36:37]
67 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
68 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i1@rel32@lo+4
69 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i1@rel32@hi+12
70 ; GCN-DAG: v_mov_b32_e32 v0, 1{{$}}
71 ; MESA-DAG: s_mov_b64 s[2:3], s[38:39]
73 ; GCN: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
75 define amdgpu_kernel void @test_call_external_void_func_i1_imm() #0 {
76 call void @external_void_func_i1(i1 true)
80 ; GCN-LABEL: {{^}}test_call_external_void_func_i1_signext:
82 ; HSA: buffer_load_ubyte [[VAR:v[0-9]+]]
83 ; HSA: s_mov_b32 s32, 0
84 ; MESA-DAG: buffer_load_ubyte [[VAR:v[0-9]+]]
85 ; MESA-DAG: s_mov_b32 s32, 0{{$}}
87 ; GCN: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
88 ; GCN-NEXT: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i1_signext@rel32@lo+4
89 ; GCN-NEXT: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i1_signext@rel32@hi+12
90 ; GCN-NEXT: v_bfe_i32 v0, v0, 0, 1
91 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
93 define amdgpu_kernel void @test_call_external_void_func_i1_signext(i32) #0 {
94 %var = load volatile i1, i1 addrspace(1)* undef
95 call void @external_void_func_i1_signext(i1 signext %var)
99 ; FIXME: load should be scheduled before getpc
100 ; GCN-LABEL: {{^}}test_call_external_void_func_i1_zeroext:
102 ; HSA: buffer_load_ubyte v0
103 ; HSA-DAG: s_mov_b32 s32, 0{{$}}
105 ; MESA: buffer_load_ubyte v0
106 ; MESA-DAG: s_mov_b32 s32, 0{{$}}
108 ; GCN: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
109 ; GCN-NEXT: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i1_zeroext@rel32@lo+4
110 ; GCN-NEXT: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i1_zeroext@rel32@hi+12
111 ; GCN-NEXT: v_and_b32_e32 v0, 1, v0
112 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
114 define amdgpu_kernel void @test_call_external_void_func_i1_zeroext(i32) #0 {
115 %var = load volatile i1, i1 addrspace(1)* undef
116 call void @external_void_func_i1_zeroext(i1 zeroext %var)
120 ; GCN-LABEL: {{^}}test_call_external_void_func_i8_imm:
122 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
123 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i8@rel32@lo+4
124 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i8@rel32@hi+12
125 ; GCN-DAG: v_mov_b32_e32 v0, 0x7b
127 ; GCN-DAG: s_mov_b32 s32, 0{{$}}
129 ; GCN: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
131 define amdgpu_kernel void @test_call_external_void_func_i8_imm(i32) #0 {
132 call void @external_void_func_i8(i8 123)
136 ; FIXME: don't wait before call
137 ; GCN-LABEL: {{^}}test_call_external_void_func_i8_signext:
139 ; GCN-DAG: buffer_load_sbyte v0
140 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
141 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i8_signext@rel32@lo+4
142 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i8_signext@rel32@hi+12
144 ; GCN-DAG: s_mov_b32 s32, 0
147 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
149 define amdgpu_kernel void @test_call_external_void_func_i8_signext(i32) #0 {
150 %var = load volatile i8, i8 addrspace(1)* undef
151 call void @external_void_func_i8_signext(i8 signext %var)
155 ; GCN-LABEL: {{^}}test_call_external_void_func_i8_zeroext:
157 ; GCN-DAG: buffer_load_ubyte v0
158 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
159 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i8_zeroext@rel32@lo+4
160 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i8_zeroext@rel32@hi+12
162 ; GCN-DAG: s_mov_b32 s32, 0
165 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
167 define amdgpu_kernel void @test_call_external_void_func_i8_zeroext(i32) #0 {
168 %var = load volatile i8, i8 addrspace(1)* undef
169 call void @external_void_func_i8_zeroext(i8 zeroext %var)
173 ; GCN-LABEL: {{^}}test_call_external_void_func_i16_imm:
174 ; GCN-DAG: v_mov_b32_e32 v0, 0x7b{{$}}
176 ; GCN-DAG: s_mov_b32 s32, 0
179 define amdgpu_kernel void @test_call_external_void_func_i16_imm() #0 {
180 call void @external_void_func_i16(i16 123)
184 ; GCN-LABEL: {{^}}test_call_external_void_func_i16_signext:
186 ; GCN-DAG: buffer_load_sshort v0
187 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
188 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i16_signext@rel32@lo+4
189 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i16_signext@rel32@hi+12
191 ; GCN-DAG: s_mov_b32 s32, 0
194 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
196 define amdgpu_kernel void @test_call_external_void_func_i16_signext(i32) #0 {
197 %var = load volatile i16, i16 addrspace(1)* undef
198 call void @external_void_func_i16_signext(i16 signext %var)
202 ; GCN-LABEL: {{^}}test_call_external_void_func_i16_zeroext:
204 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
205 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i16_zeroext@rel32@lo+4
206 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i16_zeroext@rel32@hi+12
208 ; GCN-DAG: s_mov_b32 s32, 0
211 ; GCN-NEXT: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
213 define amdgpu_kernel void @test_call_external_void_func_i16_zeroext(i32) #0 {
214 %var = load volatile i16, i16 addrspace(1)* undef
215 call void @external_void_func_i16_zeroext(i16 zeroext %var)
219 ; GCN-LABEL: {{^}}test_call_external_void_func_i32_imm:
221 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
222 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i32@rel32@lo+4
223 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i32@rel32@hi+12
224 ; GCN-DAG: v_mov_b32_e32 v0, 42
225 ; GCN-DAG: s_mov_b32 s32, 0
227 ; GCN: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
229 define amdgpu_kernel void @test_call_external_void_func_i32_imm(i32) #0 {
230 call void @external_void_func_i32(i32 42)
234 ; GCN-LABEL: {{^}}test_call_external_void_func_i64_imm:
235 ; GCN-DAG: v_mov_b32_e32 v0, 0x7b{{$}}
236 ; GCN-DAG: v_mov_b32_e32 v1, 0{{$}}
237 ; GCN-DAG: s_getpc_b64 s{{\[}}[[PC_LO:[0-9]+]]:[[PC_HI:[0-9]+]]{{\]}}
238 ; GCN-DAG: s_add_u32 s[[PC_LO]], s[[PC_LO]], external_void_func_i64@rel32@lo+4
239 ; GCN-DAG: s_addc_u32 s[[PC_HI]], s[[PC_HI]], external_void_func_i64@rel32@hi+12
240 ; GCN: s_swappc_b64 s[30:31], s{{\[}}[[PC_LO]]:[[PC_HI]]{{\]}}
242 define amdgpu_kernel void @test_call_external_void_func_i64_imm() #0 {
243 call void @external_void_func_i64(i64 123)
247 ; GCN-LABEL: {{^}}test_call_external_void_func_v2i64:
248 ; GCN: buffer_load_dwordx4 v[0:3]
251 define amdgpu_kernel void @test_call_external_void_func_v2i64() #0 {
252 %val = load <2 x i64>, <2 x i64> addrspace(1)* null
253 call void @external_void_func_v2i64(<2 x i64> %val)
257 ; GCN-LABEL: {{^}}test_call_external_void_func_v2i64_imm:
258 ; GCN-DAG: v_mov_b32_e32 v0, 1
259 ; GCN-DAG: v_mov_b32_e32 v1, 2
260 ; GCN-DAG: v_mov_b32_e32 v2, 3
261 ; GCN-DAG: v_mov_b32_e32 v3, 4
263 define amdgpu_kernel void @test_call_external_void_func_v2i64_imm() #0 {
264 call void @external_void_func_v2i64(<2 x i64> <i64 8589934593, i64 17179869187>)
268 ; GCN-LABEL: {{^}}test_call_external_void_func_v3i64:
269 ; GCN: buffer_load_dwordx4 v[0:3]
270 ; GCN: v_mov_b32_e32 v4, 1
271 ; GCN: v_mov_b32_e32 v5, 2
274 define amdgpu_kernel void @test_call_external_void_func_v3i64() #0 {
275 %load = load <2 x i64>, <2 x i64> addrspace(1)* null
276 %val = shufflevector <2 x i64> %load, <2 x i64> <i64 8589934593, i64 undef>, <3 x i32> <i32 0, i32 1, i32 2>
278 call void @external_void_func_v3i64(<3 x i64> %val)
282 ; GCN-LABEL: {{^}}test_call_external_void_func_v4i64:
283 ; GCN: buffer_load_dwordx4 v[0:3]
284 ; GCN-DAG: v_mov_b32_e32 v4, 1
285 ; GCN-DAG: v_mov_b32_e32 v5, 2
286 ; GCN-DAG: v_mov_b32_e32 v6, 3
287 ; GCN-DAG: v_mov_b32_e32 v7, 4
291 define amdgpu_kernel void @test_call_external_void_func_v4i64() #0 {
292 %load = load <2 x i64>, <2 x i64> addrspace(1)* null
293 %val = shufflevector <2 x i64> %load, <2 x i64> <i64 8589934593, i64 17179869187>, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
294 call void @external_void_func_v4i64(<4 x i64> %val)
298 ; GCN-LABEL: {{^}}test_call_external_void_func_f16_imm:
299 ; VI: v_mov_b32_e32 v0, 0x4400
300 ; CI: v_mov_b32_e32 v0, 4.0
303 define amdgpu_kernel void @test_call_external_void_func_f16_imm() #0 {
304 call void @external_void_func_f16(half 4.0)
308 ; GCN-LABEL: {{^}}test_call_external_void_func_f32_imm:
309 ; GCN: v_mov_b32_e32 v0, 4.0
312 define amdgpu_kernel void @test_call_external_void_func_f32_imm() #0 {
313 call void @external_void_func_f32(float 4.0)
317 ; GCN-LABEL: {{^}}test_call_external_void_func_v2f32_imm:
318 ; GCN-DAG: v_mov_b32_e32 v0, 1.0
319 ; GCN-DAG: v_mov_b32_e32 v1, 2.0
321 define amdgpu_kernel void @test_call_external_void_func_v2f32_imm() #0 {
322 call void @external_void_func_v2f32(<2 x float> <float 1.0, float 2.0>)
326 ; GCN-LABEL: {{^}}test_call_external_void_func_v3f32_imm:
327 ; GCN-DAG: v_mov_b32_e32 v0, 1.0
328 ; GCN-DAG: v_mov_b32_e32 v1, 2.0
329 ; GCN-DAG: v_mov_b32_e32 v2, 4.0
332 define amdgpu_kernel void @test_call_external_void_func_v3f32_imm() #0 {
333 call void @external_void_func_v3f32(<3 x float> <float 1.0, float 2.0, float 4.0>)
337 ; GCN-LABEL: {{^}}test_call_external_void_func_v5f32_imm:
338 ; GCN-DAG: v_mov_b32_e32 v0, 1.0
339 ; GCN-DAG: v_mov_b32_e32 v1, 2.0
340 ; GCN-DAG: v_mov_b32_e32 v2, 4.0
341 ; GCN-DAG: v_mov_b32_e32 v3, -1.0
342 ; GCN-DAG: v_mov_b32_e32 v4, 0.5
345 define amdgpu_kernel void @test_call_external_void_func_v5f32_imm() #0 {
346 call void @external_void_func_v5f32(<5 x float> <float 1.0, float 2.0, float 4.0, float -1.0, float 0.5>)
350 ; GCN-LABEL: {{^}}test_call_external_void_func_f64_imm:
351 ; GCN: v_mov_b32_e32 v0, 0{{$}}
352 ; GCN: v_mov_b32_e32 v1, 0x40100000
354 define amdgpu_kernel void @test_call_external_void_func_f64_imm() #0 {
355 call void @external_void_func_f64(double 4.0)
359 ; GCN-LABEL: {{^}}test_call_external_void_func_v2f64_imm:
360 ; GCN: v_mov_b32_e32 v0, 0{{$}}
361 ; GCN: v_mov_b32_e32 v1, 2.0
362 ; GCN: v_mov_b32_e32 v2, 0{{$}}
363 ; GCN: v_mov_b32_e32 v3, 0x40100000
365 define amdgpu_kernel void @test_call_external_void_func_v2f64_imm() #0 {
366 call void @external_void_func_v2f64(<2 x double> <double 2.0, double 4.0>)
370 ; GCN-LABEL: {{^}}test_call_external_void_func_v3f64_imm:
371 ; GCN-DAG: v_mov_b32_e32 v0, 0{{$}}
372 ; GCN-DAG: v_mov_b32_e32 v1, 2.0
373 ; GCN-DAG: v_mov_b32_e32 v2, 0{{$}}
374 ; GCN-DAG: v_mov_b32_e32 v3, 0x40100000
375 ; GCN-DAG: v_mov_b32_e32 v4, 0{{$}}
376 ; GCN-DAG: v_mov_b32_e32 v5, 0x40200000
377 ; GCN-DAG: s_swappc_b64
378 define amdgpu_kernel void @test_call_external_void_func_v3f64_imm() #0 {
379 call void @external_void_func_v3f64(<3 x double> <double 2.0, double 4.0, double 8.0>)
383 ; GCN-LABEL: {{^}}test_call_external_void_func_v2i16:
384 ; GFX9: buffer_load_dword v0
387 define amdgpu_kernel void @test_call_external_void_func_v2i16() #0 {
388 %val = load <2 x i16>, <2 x i16> addrspace(1)* undef
389 call void @external_void_func_v2i16(<2 x i16> %val)
393 ; GCN-LABEL: {{^}}test_call_external_void_func_v3i16:
394 ; GFX9: buffer_load_dwordx2 v[0:1]
398 define amdgpu_kernel void @test_call_external_void_func_v3i16() #0 {
399 %val = load <3 x i16>, <3 x i16> addrspace(1)* undef
400 call void @external_void_func_v3i16(<3 x i16> %val)
404 ; GCN-LABEL: {{^}}test_call_external_void_func_v3f16:
405 ; GFX9: buffer_load_dwordx2 v[0:1]
409 define amdgpu_kernel void @test_call_external_void_func_v3f16() #0 {
410 %val = load <3 x half>, <3 x half> addrspace(1)* undef
411 call void @external_void_func_v3f16(<3 x half> %val)
415 ; GCN-LABEL: {{^}}test_call_external_void_func_v3i16_imm:
416 ; GFX9: v_mov_b32_e32 v0, 0x20001
417 ; GFX9: v_mov_b32_e32 v1, 3
419 define amdgpu_kernel void @test_call_external_void_func_v3i16_imm() #0 {
420 call void @external_void_func_v3i16(<3 x i16> <i16 1, i16 2, i16 3>)
424 ; GCN-LABEL: {{^}}test_call_external_void_func_v3f16_imm:
425 ; GFX9: v_mov_b32_e32 v0, 0x40003c00
426 ; GFX9: v_mov_b32_e32 v1, 0x4400
428 define amdgpu_kernel void @test_call_external_void_func_v3f16_imm() #0 {
429 call void @external_void_func_v3f16(<3 x half> <half 1.0, half 2.0, half 4.0>)
433 ; GCN-LABEL: {{^}}test_call_external_void_func_v4i16:
434 ; GFX9: buffer_load_dwordx2 v[0:1]
438 define amdgpu_kernel void @test_call_external_void_func_v4i16() #0 {
439 %val = load <4 x i16>, <4 x i16> addrspace(1)* undef
440 call void @external_void_func_v4i16(<4 x i16> %val)
444 ; GCN-LABEL: {{^}}test_call_external_void_func_v4i16_imm:
445 ; GFX9-DAG: v_mov_b32_e32 v0, 0x20001
446 ; GFX9-DAG: v_mov_b32_e32 v1, 0x40003
448 define amdgpu_kernel void @test_call_external_void_func_v4i16_imm() #0 {
449 call void @external_void_func_v4i16(<4 x i16> <i16 1, i16 2, i16 3, i16 4>)
453 ; GCN-LABEL: {{^}}test_call_external_void_func_v2f16:
454 ; GFX9: buffer_load_dword v0
457 define amdgpu_kernel void @test_call_external_void_func_v2f16() #0 {
458 %val = load <2 x half>, <2 x half> addrspace(1)* undef
459 call void @external_void_func_v2f16(<2 x half> %val)
463 ; GCN-LABEL: {{^}}test_call_external_void_func_v2i32:
464 ; GCN: buffer_load_dwordx2 v[0:1]
467 define amdgpu_kernel void @test_call_external_void_func_v2i32() #0 {
468 %val = load <2 x i32>, <2 x i32> addrspace(1)* undef
469 call void @external_void_func_v2i32(<2 x i32> %val)
473 ; GCN-LABEL: {{^}}test_call_external_void_func_v2i32_imm:
474 ; GCN-DAG: v_mov_b32_e32 v0, 1
475 ; GCN-DAG: v_mov_b32_e32 v1, 2
477 define amdgpu_kernel void @test_call_external_void_func_v2i32_imm() #0 {
478 call void @external_void_func_v2i32(<2 x i32> <i32 1, i32 2>)
482 ; GCN-LABEL: {{^}}test_call_external_void_func_v3i32_imm: {{.*}}
485 ; GCN-DAG: v_mov_b32_e32 v0, 3
486 ; GCN-DAG: v_mov_b32_e32 v1, 4
487 ; GCN-DAG: v_mov_b32_e32 v2, 5
490 define amdgpu_kernel void @test_call_external_void_func_v3i32_imm(i32) #0 {
491 call void @external_void_func_v3i32(<3 x i32> <i32 3, i32 4, i32 5>)
495 ; GCN-LABEL: {{^}}test_call_external_void_func_v3i32_i32:
496 ; GCN-DAG: v_mov_b32_e32 v0, 3
497 ; GCN-DAG: v_mov_b32_e32 v1, 4
498 ; GCN-DAG: v_mov_b32_e32 v2, 5
499 ; GCN-DAG: v_mov_b32_e32 v3, 6
500 define amdgpu_kernel void @test_call_external_void_func_v3i32_i32(i32) #0 {
501 call void @external_void_func_v3i32_i32(<3 x i32> <i32 3, i32 4, i32 5>, i32 6)
505 ; GCN-LABEL: {{^}}test_call_external_void_func_v4i32:
506 ; GCN: buffer_load_dwordx4 v[0:3]
509 define amdgpu_kernel void @test_call_external_void_func_v4i32() #0 {
510 %val = load <4 x i32>, <4 x i32> addrspace(1)* undef
511 call void @external_void_func_v4i32(<4 x i32> %val)
515 ; GCN-LABEL: {{^}}test_call_external_void_func_v4i32_imm:
516 ; GCN-DAG: v_mov_b32_e32 v0, 1
517 ; GCN-DAG: v_mov_b32_e32 v1, 2
518 ; GCN-DAG: v_mov_b32_e32 v2, 3
519 ; GCN-DAG: v_mov_b32_e32 v3, 4
521 define amdgpu_kernel void @test_call_external_void_func_v4i32_imm() #0 {
522 call void @external_void_func_v4i32(<4 x i32> <i32 1, i32 2, i32 3, i32 4>)
526 ; GCN-LABEL: {{^}}test_call_external_void_func_v5i32_imm:
527 ; GCN-DAG: v_mov_b32_e32 v0, 1
528 ; GCN-DAG: v_mov_b32_e32 v1, 2
529 ; GCN-DAG: v_mov_b32_e32 v2, 3
530 ; GCN-DAG: v_mov_b32_e32 v3, 4
531 ; GCN-DAG: v_mov_b32_e32 v4, 5
534 define amdgpu_kernel void @test_call_external_void_func_v5i32_imm() #0 {
535 call void @external_void_func_v5i32(<5 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5>)
539 ; GCN-LABEL: {{^}}test_call_external_void_func_v8i32:
540 ; GCN-DAG: buffer_load_dwordx4 v[0:3], off
541 ; GCN-DAG: buffer_load_dwordx4 v[4:7], off
544 define amdgpu_kernel void @test_call_external_void_func_v8i32() #0 {
545 %ptr = load <8 x i32> addrspace(1)*, <8 x i32> addrspace(1)* addrspace(4)* undef
546 %val = load <8 x i32>, <8 x i32> addrspace(1)* %ptr
547 call void @external_void_func_v8i32(<8 x i32> %val)
551 ; GCN-LABEL: {{^}}test_call_external_void_func_v8i32_imm:
552 ; GCN-DAG: v_mov_b32_e32 v0, 1
553 ; GCN-DAG: v_mov_b32_e32 v1, 2
554 ; GCN-DAG: v_mov_b32_e32 v2, 3
555 ; GCN-DAG: v_mov_b32_e32 v3, 4
556 ; GCN-DAG: v_mov_b32_e32 v4, 5
557 ; GCN-DAG: v_mov_b32_e32 v5, 6
558 ; GCN-DAG: v_mov_b32_e32 v6, 7
559 ; GCN-DAG: v_mov_b32_e32 v7, 8
561 define amdgpu_kernel void @test_call_external_void_func_v8i32_imm() #0 {
562 call void @external_void_func_v8i32(<8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>)
566 ; GCN-LABEL: {{^}}test_call_external_void_func_v16i32:
567 ; GCN-DAG: buffer_load_dwordx4 v[0:3], off
568 ; GCN-DAG: buffer_load_dwordx4 v[4:7], off
569 ; GCN-DAG: buffer_load_dwordx4 v[8:11], off
570 ; GCN-DAG: buffer_load_dwordx4 v[12:15], off
573 define amdgpu_kernel void @test_call_external_void_func_v16i32() #0 {
574 %ptr = load <16 x i32> addrspace(1)*, <16 x i32> addrspace(1)* addrspace(4)* undef
575 %val = load <16 x i32>, <16 x i32> addrspace(1)* %ptr
576 call void @external_void_func_v16i32(<16 x i32> %val)
580 ; GCN-LABEL: {{^}}test_call_external_void_func_v32i32:
581 ; GCN-DAG: buffer_load_dwordx4 v[0:3], off
582 ; GCN-DAG: buffer_load_dwordx4 v[4:7], off
583 ; GCN-DAG: buffer_load_dwordx4 v[8:11], off
584 ; GCN-DAG: buffer_load_dwordx4 v[12:15], off
585 ; GCN-DAG: buffer_load_dwordx4 v[16:19], off
586 ; GCN-DAG: buffer_load_dwordx4 v[20:23], off
587 ; GCN-DAG: buffer_load_dwordx4 v[24:27], off
588 ; GCN-DAG: buffer_load_dwordx4 v[28:31], off
591 define amdgpu_kernel void @test_call_external_void_func_v32i32() #0 {
592 %ptr = load <32 x i32> addrspace(1)*, <32 x i32> addrspace(1)* addrspace(4)* undef
593 %val = load <32 x i32>, <32 x i32> addrspace(1)* %ptr
594 call void @external_void_func_v32i32(<32 x i32> %val)
598 ; GCN-LABEL: {{^}}test_call_external_void_func_v32i32_i32:
599 ; HSA-NOT: s_add_u32 s32
601 ; MESA-NOT: s_add_u32 s32
603 ; GCN-DAG: buffer_load_dword [[VAL1:v[0-9]+]], off, s[{{[0-9]+}}:{{[0-9]+}}], 0{{$}}
604 ; GCN-DAG: buffer_load_dwordx4 v[0:3], off
605 ; GCN-DAG: buffer_load_dwordx4 v[4:7], off
606 ; GCN-DAG: buffer_load_dwordx4 v[8:11], off
607 ; GCN-DAG: buffer_load_dwordx4 v[12:15], off
608 ; GCN-DAG: buffer_load_dwordx4 v[16:19], off
609 ; GCN-DAG: buffer_load_dwordx4 v[20:23], off
610 ; GCN-DAG: buffer_load_dwordx4 v[24:27], off
611 ; GCN-DAG: buffer_load_dwordx4 v[28:31], off
614 ; GCN: buffer_store_dword [[VAL1]], off, s[{{[0-9]+}}:{{[0-9]+}}], s32{{$}}
617 define amdgpu_kernel void @test_call_external_void_func_v32i32_i32(i32) #0 {
618 %ptr0 = load <32 x i32> addrspace(1)*, <32 x i32> addrspace(1)* addrspace(4)* undef
619 %val0 = load <32 x i32>, <32 x i32> addrspace(1)* %ptr0
620 %val1 = load i32, i32 addrspace(1)* undef
621 call void @external_void_func_v32i32_i32(<32 x i32> %val0, i32 %val1)
625 ; GCN-LABEL: {{^}}test_call_external_i32_func_i32_imm:
626 ; GCN: v_mov_b32_e32 v0, 42
627 ; GCN: s_swappc_b64 s[30:31],
629 ; GCN: buffer_store_dword v0, off, s[36:39], 0
630 define amdgpu_kernel void @test_call_external_i32_func_i32_imm(i32 addrspace(1)* %out) #0 {
631 %val = call i32 @external_i32_func_i32(i32 42)
632 store volatile i32 %val, i32 addrspace(1)* %out
636 ; GCN-LABEL: {{^}}test_call_external_void_func_struct_i8_i32:
637 ; GCN: buffer_load_ubyte v0, off
638 ; GCN: buffer_load_dword v1, off
641 define amdgpu_kernel void @test_call_external_void_func_struct_i8_i32() #0 {
642 %ptr0 = load { i8, i32 } addrspace(1)*, { i8, i32 } addrspace(1)* addrspace(4)* undef
643 %val = load { i8, i32 }, { i8, i32 } addrspace(1)* %ptr0
644 call void @external_void_func_struct_i8_i32({ i8, i32 } %val)
648 ; GCN-LABEL: {{^}}test_call_external_void_func_byval_struct_i8_i32:
649 ; GCN-DAG: v_mov_b32_e32 [[VAL0:v[0-9]+]], 3
650 ; GCN-DAG: v_mov_b32_e32 [[VAL1:v[0-9]+]], 8
651 ; MESA-DAG: buffer_store_byte [[VAL0]], off, s[36:39], 0 offset:8
652 ; MESA-DAG: buffer_store_dword [[VAL1]], off, s[36:39], 0 offset:12
654 ; HSA-DAG: buffer_store_byte [[VAL0]], off, s[0:3], 0 offset:8
655 ; HSA-DAG: buffer_store_dword [[VAL1]], off, s[0:3], 0 offset:12
657 ; HSA: buffer_load_dword [[RELOAD_VAL0:v[0-9]+]], off, s[0:3], 0 offset:8
658 ; HSA: buffer_load_dword [[RELOAD_VAL1:v[0-9]+]], off, s[0:3], 0 offset:12
660 ; MESA: buffer_load_dword [[RELOAD_VAL0:v[0-9]+]], off, s[36:39], 0 offset:8
661 ; MESA: buffer_load_dword [[RELOAD_VAL1:v[0-9]+]], off, s[36:39], 0 offset:12
663 ; GCN-DAG: s_movk_i32 [[SP:s[0-9]+]], 0x400{{$}}
665 ; HSA-DAG: buffer_store_dword [[RELOAD_VAL0]], off, s[0:3], [[SP]]{{$}}
666 ; HSA-DAG: buffer_store_dword [[RELOAD_VAL1]], off, s[0:3], [[SP]] offset:4
668 ; MESA-DAG: buffer_store_dword [[RELOAD_VAL0]], off, s[36:39], [[SP]]{{$}}
669 ; MESA-DAG: buffer_store_dword [[RELOAD_VAL1]], off, s[36:39], [[SP]] offset:4
671 ; GCN-NEXT: s_swappc_b64
673 define amdgpu_kernel void @test_call_external_void_func_byval_struct_i8_i32() #0 {
674 %val = alloca { i8, i32 }, align 4, addrspace(5)
675 %gep0 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %val, i32 0, i32 0
676 %gep1 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %val, i32 0, i32 1
677 store i8 3, i8 addrspace(5)* %gep0
678 store i32 8, i32 addrspace(5)* %gep1
679 call void @external_void_func_byval_struct_i8_i32({ i8, i32 } addrspace(5)* byval({ i8, i32 }) %val)
683 ; GCN-LABEL: {{^}}test_call_external_void_func_sret_struct_i8_i32_byval_struct_i8_i32:
684 ; GCN-DAG: s_movk_i32 [[SP:s[0-9]+]], 0x800{{$}}
686 ; GCN-DAG: v_mov_b32_e32 [[VAL0:v[0-9]+]], 3
687 ; GCN-DAG: v_mov_b32_e32 [[VAL1:v[0-9]+]], 8
688 ; GCN-DAG: buffer_store_byte [[VAL0]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:8
689 ; GCN-DAG: buffer_store_dword [[VAL1]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:12
691 ; GCN-DAG: buffer_load_dword [[RELOAD_VAL0:v[0-9]+]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:8
692 ; GCN-DAG: buffer_load_dword [[RELOAD_VAL1:v[0-9]+]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:12
694 ; GCN-NOT: s_add_u32 [[SP]]
695 ; GCN-DAG: buffer_store_dword [[RELOAD_VAL0]], off, s{{\[[0-9]+:[0-9]+\]}}, [[SP]]{{$}}
696 ; GCN-DAG: buffer_store_dword [[RELOAD_VAL1]], off, s{{\[[0-9]+:[0-9]+\]}}, [[SP]] offset:4
698 ; GCN-DAG: buffer_load_ubyte [[LOAD_OUT_VAL0:v[0-9]+]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:16
699 ; GCN-DAG: buffer_load_dword [[LOAD_OUT_VAL1:v[0-9]+]], off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:20
700 ; GCN-NOT: s_sub_u32 [[SP]]
702 ; GCN: buffer_store_byte [[LOAD_OUT_VAL0]], off
703 ; GCN: buffer_store_dword [[LOAD_OUT_VAL1]], off
704 define amdgpu_kernel void @test_call_external_void_func_sret_struct_i8_i32_byval_struct_i8_i32(i32) #0 {
705 %in.val = alloca { i8, i32 }, align 4, addrspace(5)
706 %out.val = alloca { i8, i32 }, align 4, addrspace(5)
707 %in.gep0 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %in.val, i32 0, i32 0
708 %in.gep1 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %in.val, i32 0, i32 1
709 store i8 3, i8 addrspace(5)* %in.gep0
710 store i32 8, i32 addrspace(5)* %in.gep1
711 call void @external_void_func_sret_struct_i8_i32_byval_struct_i8_i32({ i8, i32 } addrspace(5)* %out.val, { i8, i32 } addrspace(5)* byval({ i8, i32 }) %in.val)
712 %out.gep0 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %out.val, i32 0, i32 0
713 %out.gep1 = getelementptr inbounds { i8, i32 }, { i8, i32 } addrspace(5)* %out.val, i32 0, i32 1
714 %out.val0 = load i8, i8 addrspace(5)* %out.gep0
715 %out.val1 = load i32, i32 addrspace(5)* %out.gep1
717 store volatile i8 %out.val0, i8 addrspace(1)* undef
718 store volatile i32 %out.val1, i32 addrspace(1)* undef
722 ; GCN-LABEL: {{^}}test_call_external_void_func_v16i8:
723 define amdgpu_kernel void @test_call_external_void_func_v16i8() #0 {
724 %ptr = load <16 x i8> addrspace(1)*, <16 x i8> addrspace(1)* addrspace(4)* undef
725 %val = load <16 x i8>, <16 x i8> addrspace(1)* %ptr
726 call void @external_void_func_v16i8(<16 x i8> %val)
730 ; GCN-LABEL: {{^}}stack_passed_arg_alignment_v32i32_f64:
731 ; GCN: buffer_store_dword v{{[0-9]+}}, off, s{{\[[0-9]+:[0-9]+\]}}, s32{{$}}
732 ; GCN: buffer_store_dword v{{[0-9]+}}, off, s{{\[[0-9]+:[0-9]+\]}}, s32 offset:4
734 define amdgpu_kernel void @stack_passed_arg_alignment_v32i32_f64(<32 x i32> %val, double %tmp) #0 {
736 call void @stack_passed_f64_arg(<32 x i32> %val, double %tmp)
740 ; GCN-LABEL: {{^}}tail_call_byval_align16:
742 ; GCN: buffer_load_dword [[VREG2:v[0-9]+]], off, s[0:3], s32 offset:12
743 ; GCN: buffer_load_dword [[VREG1:v[0-9]+]], off, s[0:3], s32 offset:8
747 ; GCN: buffer_store_dword [[VREG2]], off, s[0:3], s32 offset:4
748 ; GCN: buffer_store_dword [[VREG1]], off, s[0:3], s32{{$}}
751 define void @tail_call_byval_align16(<32 x i32> %val, double %tmp) #0 {
753 %alloca = alloca double, align 8, addrspace(5)
754 tail call void @byval_align16_f64_arg(<32 x i32> %val, double addrspace(5)* byval(double) align 16 %alloca)
758 ; GCN-LABEL: {{^}}tail_call_stack_passed_arg_alignment_v32i32_f64:
760 ; GCN: buffer_load_dword v32, off, s[0:3], s32 offset:4
761 ; GCN: buffer_load_dword v33, off, s[0:3], s32{{$}}
763 ; GCN: buffer_store_dword v33, off, s[0:3], s32{{$}}
764 ; GCN: buffer_store_dword v32, off, s[0:3], s32 offset:4
767 define void @tail_call_stack_passed_arg_alignment_v32i32_f64(<32 x i32> %val, double %tmp) #0 {
769 tail call void @stack_passed_f64_arg(<32 x i32> %val, double %tmp)
773 ; GCN-LABEL: {{^}}stack_12xv3i32:
774 ; GCN: v_mov_b32_e32 [[REG12:v[0-9]+]], 12
775 ; GCN: buffer_store_dword [[REG12]], {{.*$}}
776 ; GCN: v_mov_b32_e32 [[REG13:v[0-9]+]], 13
777 ; GCN: buffer_store_dword [[REG13]], {{.*}} offset:4
778 ; GCN: v_mov_b32_e32 [[REG14:v[0-9]+]], 14
779 ; GCN: buffer_store_dword [[REG14]], {{.*}} offset:8
780 ; GCN: v_mov_b32_e32 [[REG15:v[0-9]+]], 15
781 ; GCN: buffer_store_dword [[REG15]], {{.*}} offset:12
782 ; GCN: v_mov_b32_e32 v31, 11
784 define void @stack_12xv3i32() #0 {
786 call void @external_void_func_12xv3i32(
787 <3 x i32><i32 0, i32 0, i32 0>,
788 <3 x i32><i32 1, i32 1, i32 1>,
789 <3 x i32><i32 2, i32 2, i32 2>,
790 <3 x i32><i32 3, i32 3, i32 3>,
791 <3 x i32><i32 4, i32 4, i32 4>,
792 <3 x i32><i32 5, i32 5, i32 5>,
793 <3 x i32><i32 6, i32 6, i32 6>,
794 <3 x i32><i32 7, i32 7, i32 7>,
795 <3 x i32><i32 8, i32 8, i32 8>,
796 <3 x i32><i32 9, i32 9, i32 9>,
797 <3 x i32><i32 10, i32 11, i32 12>,
798 <3 x i32><i32 13, i32 14, i32 15>)
802 ; GCN-LABEL: {{^}}stack_12xv3f32:
803 ; GCN: v_mov_b32_e32 [[REG12:v[0-9]+]], 0x41400000
804 ; GCN: buffer_store_dword [[REG12]], {{.*$}}
805 ; GCN: v_mov_b32_e32 [[REG13:v[0-9]+]], 0x41500000
806 ; GCN: buffer_store_dword [[REG13]], {{.*}} offset:4
807 ; GCN: v_mov_b32_e32 [[REG14:v[0-9]+]], 0x41600000
808 ; GCN: buffer_store_dword [[REG14]], {{.*}} offset:8
809 ; GCN: v_mov_b32_e32 [[REG15:v[0-9]+]], 0x41700000
810 ; GCN: buffer_store_dword [[REG15]], {{.*}} offset:12
811 ; GCN: v_mov_b32_e32 v31, 0x41300000
813 define void @stack_12xv3f32() #0 {
815 call void @external_void_func_12xv3f32(
816 <3 x float><float 0.0, float 0.0, float 0.0>,
817 <3 x float><float 1.0, float 1.0, float 1.0>,
818 <3 x float><float 2.0, float 2.0, float 2.0>,
819 <3 x float><float 3.0, float 3.0, float 3.0>,
820 <3 x float><float 4.0, float 4.0, float 4.0>,
821 <3 x float><float 5.0, float 5.0, float 5.0>,
822 <3 x float><float 6.0, float 6.0, float 6.0>,
823 <3 x float><float 7.0, float 7.0, float 7.0>,
824 <3 x float><float 8.0, float 8.0, float 8.0>,
825 <3 x float><float 9.0, float 9.0, float 9.0>,
826 <3 x float><float 10.0, float 11.0, float 12.0>,
827 <3 x float><float 13.0, float 14.0, float 15.0>)
831 ; GCN-LABEL: {{^}}stack_8xv5i32:
833 ; GCN: v_mov_b32_e32 [[REG8:v[0-9]+]], 8
834 ; GCN: buffer_store_dword [[REG8]], {{.*$}}
835 ; GCN: v_mov_b32_e32 [[REG9:v[0-9]+]], 9
836 ; GCN: buffer_store_dword [[REG9]], {{.*}} offset:4
837 ; GCN: v_mov_b32_e32 [[REG10:v[0-9]+]], 10
838 ; GCN: buffer_store_dword [[REG10]], {{.*}} offset:8
839 ; GCN: v_mov_b32_e32 [[REG11:v[0-9]+]], 11
840 ; GCN: buffer_store_dword [[REG11]], {{.*}} offset:12
841 ; GCN: v_mov_b32_e32 [[REG12:v[0-9]+]], 12
842 ; GCN: buffer_store_dword [[REG12]], {{.*}} offset:16
843 ; GCN: v_mov_b32_e32 [[REG13:v[0-9]+]], 13
844 ; GCN: buffer_store_dword [[REG13]], {{.*}} offset:20
845 ; GCN: v_mov_b32_e32 [[REG14:v[0-9]+]], 14
846 ; GCN: buffer_store_dword [[REG14]], {{.*}} offset:24
847 ; GCN: v_mov_b32_e32 [[REG15:v[0-9]+]], 15
848 ; GCN: buffer_store_dword [[REG15]], {{.*}} offset:28
850 ; GCN: v_mov_b32_e32 v31, 7
852 define void @stack_8xv5i32() #0 {
854 call void @external_void_func_8xv5i32(
855 <5 x i32><i32 0, i32 0, i32 0, i32 0, i32 0>,
856 <5 x i32><i32 1, i32 1, i32 1, i32 1, i32 1>,
857 <5 x i32><i32 2, i32 2, i32 2, i32 2, i32 2>,
858 <5 x i32><i32 3, i32 3, i32 3, i32 3, i32 3>,
859 <5 x i32><i32 4, i32 4, i32 4, i32 4, i32 4>,
860 <5 x i32><i32 5, i32 5, i32 5, i32 5, i32 5>,
861 <5 x i32><i32 6, i32 7, i32 8, i32 9, i32 10>,
862 <5 x i32><i32 11, i32 12, i32 13, i32 14, i32 15>)
866 ; GCN-LABEL: {{^}}stack_8xv5f32:
867 ; GCN: v_mov_b32_e32 [[REG8:v[0-9]+]], 0x41000000
868 ; GCN: buffer_store_dword [[REG8]], {{.*$}}
869 ; GCN: v_mov_b32_e32 [[REG9:v[0-9]+]], 0x41100000
870 ; GCN: buffer_store_dword [[REG9]], {{.*}} offset:4
871 ; GCN: v_mov_b32_e32 [[REG10:v[0-9]+]], 0x41200000
872 ; GCN: buffer_store_dword [[REG10]], {{.*}} offset:8
873 ; GCN: v_mov_b32_e32 [[REG11:v[0-9]+]], 0x41300000
874 ; GCN: buffer_store_dword [[REG11]], {{.*}} offset:12
875 ; GCN: v_mov_b32_e32 [[REG12:v[0-9]+]], 0x41400000
876 ; GCN: buffer_store_dword [[REG12]], {{.*}} offset:16
877 ; GCN: v_mov_b32_e32 [[REG13:v[0-9]+]], 0x41500000
878 ; GCN: buffer_store_dword [[REG13]], {{.*}} offset:20
879 ; GCN: v_mov_b32_e32 [[REG14:v[0-9]+]], 0x41600000
880 ; GCN: buffer_store_dword [[REG14]], {{.*}} offset:24
881 ; GCN: v_mov_b32_e32 [[REG15:v[0-9]+]], 0x41700000
882 ; GCN: buffer_store_dword [[REG15]], {{.*}} offset:28
884 ; GCN: v_mov_b32_e32 v31, 0x40e00000
886 define void @stack_8xv5f32() #0 {
888 call void @external_void_func_8xv5f32(
889 <5 x float><float 0.0, float 0.0, float 0.0, float 0.0, float 0.0>,
890 <5 x float><float 1.0, float 1.0, float 1.0, float 1.0, float 1.0>,
891 <5 x float><float 2.0, float 2.0, float 2.0, float 2.0, float 2.0>,
892 <5 x float><float 3.0, float 3.0, float 3.0, float 3.0, float 3.0>,
893 <5 x float><float 4.0, float 4.0, float 4.0, float 4.0, float 4.0>,
894 <5 x float><float 5.0, float 5.0, float 5.0, float 5.0, float 5.0>,
895 <5 x float><float 6.0, float 7.0, float 8.0, float 9.0, float 10.0>,
896 <5 x float><float 11.0, float 12.0, float 13.0, float 14.0, float 15.0>)
900 declare hidden void @byval_align16_f64_arg(<32 x i32>, double addrspace(5)* byval(double) align 16) #0
901 declare hidden void @stack_passed_f64_arg(<32 x i32>, double) #0
902 declare hidden void @external_void_func_12xv3i32(<3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>,
903 <3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>, <3 x i32>) #0
904 declare hidden void @external_void_func_8xv5i32(<5 x i32>, <5 x i32>, <5 x i32>, <5 x i32>,
905 <5 x i32>, <5 x i32>, <5 x i32>, <5 x i32>) #0
906 declare hidden void @external_void_func_12xv3f32(<3 x float>, <3 x float>, <3 x float>, <3 x float>,
907 <3 x float>, <3 x float>, <3 x float>, <3 x float>, <3 x float>, <3 x float>, <3 x float>, <3 x float>) #0
908 declare hidden void @external_void_func_8xv5f32(<5 x float>, <5 x float>, <5 x float>, <5 x float>,
909 <5 x float>, <5 x float>, <5 x float>, <5 x float>) #0
910 attributes #0 = { nounwind }
911 attributes #1 = { nounwind readnone }
912 attributes #2 = { nounwind noinline }