1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,VI %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,CI %s
4 %struct.ByValStruct = type { [4 x i32] }
6 ; GCN-LABEL: {{^}}void_func_byval_struct:
7 ; GCN: s_mov_b32 s5, s32
8 ; GCN: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s5 offset:4{{$}}
10 ; GCN: buffer_store_dword [[LOAD0]], off, s[0:3], s5 offset:4{{$}}
13 ; GCN: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:20{{$}}
15 ; GCN: buffer_store_dword [[LOAD1]], off, s[0:3], s5 offset:20{{$}}
17 define void @void_func_byval_struct(%struct.ByValStruct addrspace(5)* byval noalias nocapture align 4 %arg0, %struct.ByValStruct addrspace(5)* byval noalias nocapture align 4 %arg1) #1 {
19 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
20 %tmp = load volatile i32, i32 addrspace(5)* %arrayidx, align 4
21 %add = add nsw i32 %tmp, 1
22 store volatile i32 %add, i32 addrspace(5)* %arrayidx, align 4
23 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
24 %tmp1 = load volatile i32, i32 addrspace(5)* %arrayidx2, align 4
25 %add3 = add nsw i32 %tmp1, 2
26 store volatile i32 %add3, i32 addrspace(5)* %arrayidx2, align 4
27 store volatile i32 9, i32 addrspace(1)* null, align 4
31 ; GCN-LABEL: {{^}}void_func_byval_struct_non_leaf:
32 ; GCN: s_mov_b32 s5, s32
33 ; GCN-DAG: buffer_store_dword v32
34 ; GCN-DAG: buffer_store_dword v33
35 ; GCN-NOT: v_writelane_b32 v{{[0-9]+}}, s32
36 ; GCN-DAG: v_writelane_b32
37 ; GCN-DAG: s_add_u32 s32, s32, 0xc00{{$}}
38 ; GCN-DAG: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s5 offset:4{{$}}
39 ; GCN-DAG: v_add_{{[iu]}}32_e32 [[ADD0:v[0-9]+]], vcc, 1, [[LOAD0]]
40 ; GCN-DAG: buffer_store_dword [[ADD0]], off, s[0:3], s5 offset:4{{$}}
42 ; GCN-DAG: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:20{{$}}
43 ; GCN-DAG: v_add_{{[iu]}}32_e32 [[ADD1:v[0-9]+]], vcc, 2, [[LOAD1]]
47 ; GCN: buffer_store_dword [[ADD1]], off, s[0:3], s5 offset:20{{$}}
50 ; GCN-NOT: v_readlane_b32 s32
51 ; GCN-DAG: buffer_load_dword v32,
52 ; GCN-DAG: buffer_load_dword v33,
53 ; GCN: s_sub_u32 s32, s32, 0xc00{{$}}
55 define void @void_func_byval_struct_non_leaf(%struct.ByValStruct addrspace(5)* byval noalias nocapture align 4 %arg0, %struct.ByValStruct addrspace(5)* byval noalias nocapture align 4 %arg1) #1 {
57 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
58 %tmp = load volatile i32, i32 addrspace(5)* %arrayidx, align 4
59 %add = add nsw i32 %tmp, 1
60 store volatile i32 %add, i32 addrspace(5)* %arrayidx, align 4
61 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
62 %tmp1 = load volatile i32, i32 addrspace(5)* %arrayidx2, align 4
63 %add3 = add nsw i32 %tmp1, 2
64 call void @external_void_func_void()
65 store volatile i32 %add3, i32 addrspace(5)* %arrayidx2, align 4
66 store volatile i32 9, i32 addrspace(1)* null, align 4
70 ; GCN-LABEL: {{^}}call_void_func_byval_struct_func:
71 ; GCN: s_mov_b32 s5, s32
72 ; GCN-DAG: s_add_u32 s32, s32, 0xc00{{$}}
73 ; GCN-DAG: v_writelane_b32
75 ; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9
76 ; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13
78 ; GCN-DAG: buffer_store_dword [[NINE]], off, s[0:3], s5 offset:8
79 ; GCN-DAG: buffer_store_dword [[THIRTEEN]], off, s[0:3], s5 offset:24
81 ; GCN: buffer_load_dword [[LOAD4:v[0-9]+]], off, s[0:3], s5 offset:24
82 ; GCN: buffer_load_dword [[LOAD5:v[0-9]+]], off, s[0:3], s5 offset:28
83 ; GCN: buffer_load_dword [[LOAD6:v[0-9]+]], off, s[0:3], s5 offset:32
84 ; GCN: buffer_load_dword [[LOAD7:v[0-9]+]], off, s[0:3], s5 offset:36
86 ; GCN-DAG: buffer_store_dword [[LOAD4]], off, s[0:3], s32 offset:20
87 ; GCN-DAG: buffer_store_dword [[LOAD5]], off, s[0:3], s32 offset:24
88 ; GCN-DAG: buffer_store_dword [[LOAD6]], off, s[0:3], s32 offset:28
89 ; GCN-DAG: buffer_store_dword [[LOAD7]], off, s[0:3], s32 offset:32
91 ; GCN-DAG: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s5 offset:8
92 ; GCN-DAG: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:12
93 ; GCN-DAG: buffer_load_dword [[LOAD2:v[0-9]+]], off, s[0:3], s5 offset:16
94 ; GCN-DAG: buffer_load_dword [[LOAD3:v[0-9]+]], off, s[0:3], s5 offset:20
96 ; GCN-NOT: s_add_u32 s32, s32, 0x800
98 ; GCN-DAG: buffer_store_dword [[LOAD0]], off, s[0:3], s32 offset:4{{$}}
99 ; GCN-DAG: buffer_store_dword [[LOAD1]], off, s[0:3], s32 offset:8
100 ; GCN-DAG: buffer_store_dword [[LOAD2]], off, s[0:3], s32 offset:12
101 ; GCN-DAG: buffer_store_dword [[LOAD3]], off, s[0:3], s32 offset:16
105 ; GCN-NOT: v_readlane_b32 s32
106 ; GCN: v_readlane_b32
107 ; GCN-NOT: v_readlane_b32 s32
109 ; GCN-NOT: s_sub_u32 s32, s32, 0x800
111 ; GCN: s_sub_u32 s32, s32, 0xc00{{$}}
112 ; GCN-NEXT: s_waitcnt
113 ; GCN-NEXT: s_setpc_b64
114 define void @call_void_func_byval_struct_func() #1 {
116 %arg0 = alloca %struct.ByValStruct, align 4, addrspace(5)
117 %arg1 = alloca %struct.ByValStruct, align 4, addrspace(5)
118 %tmp = bitcast %struct.ByValStruct addrspace(5)* %arg0 to i8 addrspace(5)*
119 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp)
120 %tmp1 = bitcast %struct.ByValStruct addrspace(5)* %arg1 to i8 addrspace(5)*
121 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp1)
122 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
123 store volatile i32 9, i32 addrspace(5)* %arrayidx, align 4
124 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
125 store volatile i32 13, i32 addrspace(5)* %arrayidx2, align 4
126 call void @void_func_byval_struct(%struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg0, %struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg1)
127 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp1)
128 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp)
132 ; GCN-LABEL: {{^}}call_void_func_byval_struct_kernel:
133 ; GCN: s_mov_b32 s33, s7
134 ; GCN: s_add_u32 s32, s33, 0xc00{{$}}
136 ; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9
137 ; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13
138 ; GCN-DAG: buffer_store_dword [[NINE]], off, s[0:3], s33 offset:8
139 ; GCN: buffer_store_dword [[THIRTEEN]], off, s[0:3], s33 offset:24
141 ; GCN-NOT: s_add_u32 s32, s32, 0x800
143 ; GCN-DAG: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s33 offset:8
144 ; GCN-DAG: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s33 offset:12
145 ; GCN-DAG: buffer_load_dword [[LOAD2:v[0-9]+]], off, s[0:3], s33 offset:16
146 ; GCN-DAG: buffer_load_dword [[LOAD3:v[0-9]+]], off, s[0:3], s33 offset:20
148 ; GCN-DAG: buffer_store_dword [[LOAD0]], off, s[0:3], s32 offset:4{{$}}
149 ; GCN-DAG: buffer_store_dword [[LOAD1]], off, s[0:3], s32 offset:8
150 ; GCN-DAG: buffer_store_dword [[LOAD2]], off, s[0:3], s32 offset:12
151 ; GCN-DAG: buffer_store_dword [[LOAD3]], off, s[0:3], s32 offset:16
153 ; GCN-DAG: buffer_load_dword [[LOAD4:v[0-9]+]], off, s[0:3], s33 offset:24
154 ; GCN-DAG: buffer_load_dword [[LOAD5:v[0-9]+]], off, s[0:3], s33 offset:28
155 ; GCN-DAG: buffer_load_dword [[LOAD6:v[0-9]+]], off, s[0:3], s33 offset:32
156 ; GCN-DAG: buffer_load_dword [[LOAD7:v[0-9]+]], off, s[0:3], s33 offset:36
158 ; GCN-DAG: buffer_store_dword [[LOAD4]], off, s[0:3], s32 offset:20
159 ; GCN-DAG: buffer_store_dword [[LOAD5]], off, s[0:3], s32 offset:24
160 ; GCN-DAG: buffer_store_dword [[LOAD6]], off, s[0:3], s32 offset:28
161 ; GCN-DAG: buffer_store_dword [[LOAD7]], off, s[0:3], s32 offset:32
165 ; GCN-NOT: s_sub_u32 s32
167 define amdgpu_kernel void @call_void_func_byval_struct_kernel() #1 {
169 %arg0 = alloca %struct.ByValStruct, align 4, addrspace(5)
170 %arg1 = alloca %struct.ByValStruct, align 4, addrspace(5)
171 %tmp = bitcast %struct.ByValStruct addrspace(5)* %arg0 to i8 addrspace(5)*
172 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp)
173 %tmp1 = bitcast %struct.ByValStruct addrspace(5)* %arg1 to i8 addrspace(5)*
174 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp1)
175 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
176 store volatile i32 9, i32 addrspace(5)* %arrayidx, align 4
177 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
178 store volatile i32 13, i32 addrspace(5)* %arrayidx2, align 4
179 call void @void_func_byval_struct(%struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg0, %struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg1)
180 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp1)
181 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp)
185 ; GCN-LABEL: {{^}}void_func_byval_struct_align8:
186 ; GCN: s_mov_b32 s5, s32
187 ; GCN: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s5 offset:8{{$}}
189 ; GCN: buffer_store_dword [[LOAD0]], off, s[0:3], s5 offset:8{{$}}
192 ; GCN: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:24{{$}}
194 ; GCN: buffer_store_dword [[LOAD1]], off, s[0:3], s5 offset:24{{$}}
196 define void @void_func_byval_struct_align8(%struct.ByValStruct addrspace(5)* byval noalias nocapture align 8 %arg0, %struct.ByValStruct addrspace(5)* byval noalias nocapture align 8 %arg1) #1 {
198 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
199 %tmp = load volatile i32, i32 addrspace(5)* %arrayidx, align 8
200 %add = add nsw i32 %tmp, 1
201 store volatile i32 %add, i32 addrspace(5)* %arrayidx, align 8
202 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
203 %tmp1 = load volatile i32, i32 addrspace(5)* %arrayidx2, align 8
204 %add3 = add nsw i32 %tmp1, 2
205 store volatile i32 %add3, i32 addrspace(5)* %arrayidx2, align 8
206 store volatile i32 9, i32 addrspace(1)* null, align 4
210 ; Make sure the byval alignment is respected in the call frame setup
211 ; GCN-LABEL: {{^}}call_void_func_byval_struct_align8_kernel:
212 ; GCN: s_mov_b32 s33, s7
213 ; GCN: s_add_u32 s32, s33, 0xc00{{$}}
215 ; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9
216 ; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13
217 ; GCN-DAG: buffer_store_dword [[NINE]], off, s[0:3], s33 offset:8
218 ; GCN: buffer_store_dword [[THIRTEEN]], off, s[0:3], s33 offset:24
220 ; GCN-NOT: s_add_u32 s32, s32, 0x800
222 ; GCN-DAG: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s33 offset:8
223 ; GCN-DAG: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s33 offset:12
224 ; GCN-DAG: buffer_load_dword [[LOAD2:v[0-9]+]], off, s[0:3], s33 offset:16
225 ; GCN-DAG: buffer_load_dword [[LOAD3:v[0-9]+]], off, s[0:3], s33 offset:20
227 ; GCN-DAG: buffer_store_dword [[LOAD0]], off, s[0:3], s32 offset:8{{$}}
228 ; GCN-DAG: buffer_store_dword [[LOAD1]], off, s[0:3], s32 offset:12
229 ; GCN-DAG: buffer_store_dword [[LOAD2]], off, s[0:3], s32 offset:16
230 ; GCN-DAG: buffer_store_dword [[LOAD3]], off, s[0:3], s32 offset:20
232 ; GCN-DAG: buffer_load_dword [[LOAD4:v[0-9]+]], off, s[0:3], s33 offset:24
233 ; GCN-DAG: buffer_load_dword [[LOAD5:v[0-9]+]], off, s[0:3], s33 offset:28
234 ; GCN-DAG: buffer_load_dword [[LOAD6:v[0-9]+]], off, s[0:3], s33 offset:32
235 ; GCN-DAG: buffer_load_dword [[LOAD7:v[0-9]+]], off, s[0:3], s33 offset:36
237 ; GCN-DAG: buffer_store_dword [[LOAD4]], off, s[0:3], s32 offset:24
238 ; GCN-DAG: buffer_store_dword [[LOAD5]], off, s[0:3], s32 offset:28
239 ; GCN-DAG: buffer_store_dword [[LOAD6]], off, s[0:3], s32 offset:32
240 ; GCN-DAG: buffer_store_dword [[LOAD7]], off, s[0:3], s32 offset:36
244 ; GCN-NOT: s_sub_u32 s32
246 define amdgpu_kernel void @call_void_func_byval_struct_align8_kernel() #1 {
248 %arg0 = alloca %struct.ByValStruct, align 8, addrspace(5)
249 %arg1 = alloca %struct.ByValStruct, align 8, addrspace(5)
250 %tmp = bitcast %struct.ByValStruct addrspace(5)* %arg0 to i8 addrspace(5)*
251 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp)
252 %tmp1 = bitcast %struct.ByValStruct addrspace(5)* %arg1 to i8 addrspace(5)*
253 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp1)
254 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
255 store volatile i32 9, i32 addrspace(5)* %arrayidx, align 8
256 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
257 store volatile i32 13, i32 addrspace(5)* %arrayidx2, align 8
258 call void @void_func_byval_struct_align8(%struct.ByValStruct addrspace(5)* byval nonnull align 8 %arg0, %struct.ByValStruct addrspace(5)* byval nonnull align 8 %arg1)
259 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp1)
260 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp)
264 ; GCN-LABEL: {{^}}call_void_func_byval_struct_align8_func:
265 ; GCN: s_mov_b32 s5, s32
266 ; GCN-DAG: s_add_u32 s32, s32, 0xc00{{$}}
267 ; GCN-DAG: v_writelane_b32
269 ; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9
270 ; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13
272 ; GCN-DAG: buffer_store_dword [[NINE]], off, s[0:3], s5 offset:8
273 ; GCN-DAG: buffer_store_dword [[THIRTEEN]], off, s[0:3], s5 offset:24
275 ; GCN: buffer_load_dword [[LOAD4:v[0-9]+]], off, s[0:3], s5 offset:24
276 ; GCN: buffer_load_dword [[LOAD5:v[0-9]+]], off, s[0:3], s5 offset:28
277 ; GCN: buffer_load_dword [[LOAD6:v[0-9]+]], off, s[0:3], s5 offset:32
278 ; GCN: buffer_load_dword [[LOAD7:v[0-9]+]], off, s[0:3], s5 offset:36
280 ; GCN-DAG: buffer_store_dword [[LOAD4]], off, s[0:3], s32 offset:24
281 ; GCN-DAG: buffer_store_dword [[LOAD5]], off, s[0:3], s32 offset:28
282 ; GCN-DAG: buffer_store_dword [[LOAD6]], off, s[0:3], s32 offset:32
283 ; GCN-DAG: buffer_store_dword [[LOAD7]], off, s[0:3], s32 offset:36
285 ; GCN-DAG: buffer_load_dword [[LOAD0:v[0-9]+]], off, s[0:3], s5 offset:8
286 ; GCN-DAG: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:12
287 ; GCN-DAG: buffer_load_dword [[LOAD2:v[0-9]+]], off, s[0:3], s5 offset:16
288 ; GCN-DAG: buffer_load_dword [[LOAD3:v[0-9]+]], off, s[0:3], s5 offset:20
290 ; GCN-NOT: s_add_u32 s32, s32, 0x800
292 ; GCN-DAG: buffer_store_dword [[LOAD0]], off, s[0:3], s32 offset:8{{$}}
293 ; GCN-DAG: buffer_store_dword [[LOAD1]], off, s[0:3], s32 offset:12
294 ; GCN-DAG: buffer_store_dword [[LOAD2]], off, s[0:3], s32 offset:16
295 ; GCN-DAG: buffer_store_dword [[LOAD3]], off, s[0:3], s32 offset:20
300 ; GCN-NOT: v_readlane_b32 s32
301 ; GCN: v_readlane_b32
302 ; GCN-NOT: v_readlane_b32 s32
304 ; GCN-NOT: s_sub_u32 s32, s32, 0x800
306 ; GCN: s_sub_u32 s32, s32, 0xc00{{$}}
307 ; GCN-NEXT: s_waitcnt
308 ; GCN-NEXT: s_setpc_b64
309 define void @call_void_func_byval_struct_align8_func() #0 {
311 %arg0 = alloca %struct.ByValStruct, align 8, addrspace(5)
312 %arg1 = alloca %struct.ByValStruct, align 8, addrspace(5)
313 %tmp = bitcast %struct.ByValStruct addrspace(5)* %arg0 to i8 addrspace(5)*
314 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp)
315 %tmp1 = bitcast %struct.ByValStruct addrspace(5)* %arg1 to i8 addrspace(5)*
316 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp1)
317 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
318 store volatile i32 9, i32 addrspace(5)* %arrayidx, align 8
319 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
320 store volatile i32 13, i32 addrspace(5)* %arrayidx2, align 8
321 call void @void_func_byval_struct_align8(%struct.ByValStruct addrspace(5)* byval nonnull align 8 %arg0, %struct.ByValStruct addrspace(5)* byval nonnull align 8 %arg1)
322 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp1)
323 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp)
327 ; GCN-LABEL: {{^}}call_void_func_byval_struct_kernel_no_frame_pointer_elim:
328 define amdgpu_kernel void @call_void_func_byval_struct_kernel_no_frame_pointer_elim() #2 {
330 %arg0 = alloca %struct.ByValStruct, align 4, addrspace(5)
331 %arg1 = alloca %struct.ByValStruct, align 4, addrspace(5)
332 %tmp = bitcast %struct.ByValStruct addrspace(5)* %arg0 to i8 addrspace(5)*
333 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp)
334 %tmp1 = bitcast %struct.ByValStruct addrspace(5)* %arg1 to i8 addrspace(5)*
335 call void @llvm.lifetime.start.p5i8(i64 32, i8 addrspace(5)* %tmp1)
336 %arrayidx = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg0, i32 0, i32 0, i32 0
337 store volatile i32 9, i32 addrspace(5)* %arrayidx, align 4
338 %arrayidx2 = getelementptr inbounds %struct.ByValStruct, %struct.ByValStruct addrspace(5)* %arg1, i32 0, i32 0, i32 0
339 store volatile i32 13, i32 addrspace(5)* %arrayidx2, align 4
340 call void @void_func_byval_struct(%struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg0, %struct.ByValStruct addrspace(5)* byval nonnull align 4 %arg1)
341 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp1)
342 call void @llvm.lifetime.end.p5i8(i64 32, i8 addrspace(5)* %tmp)
346 declare void @external_void_func_void() #0
348 declare void @llvm.lifetime.start.p5i8(i64, i8 addrspace(5)* nocapture) #3
349 declare void @llvm.lifetime.end.p5i8(i64, i8 addrspace(5)* nocapture) #3
351 attributes #0 = { nounwind }
352 attributes #1 = { noinline norecurse nounwind }
353 attributes #2 = { nounwind norecurse "no-frame-pointer-elim"="true" }