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 3 4%struct.ByValStruct = type { [4 x i32] } 5 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{{$}} 9; GCN-NOT: s32 10; GCN: buffer_store_dword [[LOAD0]], off, s[0:3], s5 offset:4{{$}} 11; GCN-NOT: s32 12 13; GCN: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:20{{$}} 14; GCN-NOT: s32 15; GCN: buffer_store_dword [[LOAD1]], off, s[0:3], s5 offset:20{{$}} 16; GCN-NOT: s32 17define 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 { 18entry: 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 28 ret void 29} 30 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{{$}} 41 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]] 44 45; GCN: s_swappc_b64 46 47; GCN: buffer_store_dword [[ADD1]], off, s[0:3], s5 offset:20{{$}} 48 49; GCN: v_readlane_b32 50; GCN-NOT: v_readlane_b32 s32 51; GCN: buffer_load_dword v32, 52; GCN: buffer_load_dword v33, 53; GCN: s_sub_u32 s32, s32, 0xc00{{$}} 54; GCN: s_setpc_b64 55define 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 { 56entry: 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 67 ret void 68} 69 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 74 75; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9 76; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13 77 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 80 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 85 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 90 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 95 96; GCN-NOT: s_add_u32 s32, s32, 0x800 97 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 102 103 104; GCN: s_swappc_b64 105; GCN-NOT: v_readlane_b32 s32 106; GCN: v_readlane_b32 107; GCN-NOT: v_readlane_b32 s32 108 109; GCN-NOT: s_sub_u32 s32, s32, 0x800 110 111; GCN: s_sub_u32 s32, s32, 0xc00{{$}} 112; GCN-NEXT: s_waitcnt 113; GCN-NEXT: s_setpc_b64 114define void @call_void_func_byval_struct_func() #1 { 115entry: 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) 129 ret void 130} 131 132; GCN-LABEL: {{^}}call_void_func_byval_struct_kernel: 133; GCN: s_mov_b32 s33, s7 134; GCN: s_add_u32 s32, s33, 0xc00{{$}} 135 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 140 141; GCN-NOT: s_add_u32 s32, s32, 0x800 142 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 147 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 152 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 157 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 162 163 164; GCN: s_swappc_b64 165; GCN-NOT: s_sub_u32 s32 166; GCN: s_endpgm 167define amdgpu_kernel void @call_void_func_byval_struct_kernel() #1 { 168entry: 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) 182 ret void 183} 184 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{{$}} 188; GCN-NOT: s32 189; GCN: buffer_store_dword [[LOAD0]], off, s[0:3], s5 offset:8{{$}} 190; GCN-NOT: s32 191 192; GCN: buffer_load_dword [[LOAD1:v[0-9]+]], off, s[0:3], s5 offset:24{{$}} 193; GCN-NOT: s32 194; GCN: buffer_store_dword [[LOAD1]], off, s[0:3], s5 offset:24{{$}} 195; GCN-NOT: s32 196define 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 { 197entry: 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 207 ret void 208} 209 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{{$}} 214 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 219 220; GCN-NOT: s_add_u32 s32, s32, 0x800 221 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 226 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 231 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 236 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 241 242 243; GCN: s_swappc_b64 244; GCN-NOT: s_sub_u32 s32 245; GCN: s_endpgm 246define amdgpu_kernel void @call_void_func_byval_struct_align8_kernel() #1 { 247entry: 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) 261 ret void 262} 263 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 268 269; GCN-DAG: v_mov_b32_e32 [[NINE:v[0-9]+]], 9 270; GCN-DAG: v_mov_b32_e32 [[THIRTEEN:v[0-9]+]], 13 271 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 274 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 279 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 284 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 289 290; GCN-NOT: s_add_u32 s32, s32, 0x800 291 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 296 297 298 299; GCN: s_swappc_b64 300; GCN-NOT: v_readlane_b32 s32 301; GCN: v_readlane_b32 302; GCN-NOT: v_readlane_b32 s32 303 304; GCN-NOT: s_sub_u32 s32, s32, 0x800 305 306; GCN: s_sub_u32 s32, s32, 0xc00{{$}} 307; GCN-NEXT: s_waitcnt 308; GCN-NEXT: s_setpc_b64 309define void @call_void_func_byval_struct_align8_func() #0 { 310entry: 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) 324 ret void 325} 326 327; GCN-LABEL: {{^}}call_void_func_byval_struct_kernel_no_frame_pointer_elim: 328define amdgpu_kernel void @call_void_func_byval_struct_kernel_no_frame_pointer_elim() #2 { 329entry: 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) 343 ret void 344} 345 346declare void @external_void_func_void() #0 347 348declare void @llvm.lifetime.start.p5i8(i64, i8 addrspace(5)* nocapture) #3 349declare void @llvm.lifetime.end.p5i8(i64, i8 addrspace(5)* nocapture) #3 350 351attributes #0 = { nounwind } 352attributes #1 = { noinline norecurse nounwind } 353attributes #2 = { nounwind norecurse "no-frame-pointer-elim"="true" } 354