+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-rewrite-out-arguments < %s | FileCheck %s
-; CHECK: %void_one_out_arg_i32_1_use = type { i32 }
-; CHECK: %void_one_out_arg_i32_1_use_align = type { i32 }
-; CHECK: %void_one_out_arg_i32_2_use = type { i32 }
-; CHECK: %void_one_out_arg_i32_2_stores = type { i32 }
-; CHECK: %void_one_out_arg_i32_2_stores_clobber = type { i32 }
-; CHECK: %void_one_out_arg_i32_pre_call_may_clobber = type { i32 }
-; CHECK: %void_one_out_arg_v2i32_1_use = type { <2 x i32> }
-; CHECK: %void_one_out_arg_struct_1_use = type { %struct }
-; CHECK: %struct = type { i32, i8, float }
-; CHECK: %i32_one_out_arg_i32_1_use = type { i32, i32 }
-; CHECK: %unused_different_type = type { float }
-; CHECK: %multiple_same_return_noalias = type { i32, i32 }
-; CHECK: %multiple_same_return_mayalias = type { i32, i32 }
-; CHECK: %multiple_same_return_mayalias_order = type { i32, i32 }
-; CHECK: %i1_one_out_arg_i32_1_use = type { i1, i32 }
-; CHECK: %i1_zeroext_one_out_arg_i32_1_use = type { i1, i32 }
-; CHECK: %i1_signext_one_out_arg_i32_1_use = type { i1, i32 }
-; CHECK: %p1i32_noalias_one_out_arg_i32_1_use = type { i32 addrspace(1)*, i32 }
-; CHECK: %func_ptr_type = type { void ()* }
-; CHECK: %bitcast_func_ptr_type = type { void ()* }
-; CHECK: %out_arg_small_array = type { [4 x i32] }
-; CHECK: %num_regs_reach_limit = type { [15 x i32], i32 }
-; CHECK: %num_regs_reach_limit_leftover = type { [15 x i32], i32, i32 }
-; CHECK: %preserve_debug_info = type { i32 }
-; CHECK: %preserve_metadata = type { i32 }
-; CHECK: %bitcast_pointer_v4i32_v3i32 = type { <3 x i32> }
-; CHECK: %bitcast_pointer_v4i32_v3f32 = type { <3 x float> }
-; CHECK: %bitcast_pointer_i32_f32 = type { float }
-; CHECK: %bitcast_struct_v3f32_v3f32 = type { %struct.v3f32 }
-; CHECK: %struct.v3f32 = type { <3 x float> }
-; CHECK: %bitcast_struct_v3f32_v3i32 = type { %struct.v3f32 }
-; CHECK: %bitcast_struct_v4f32_v4f32 = type { %struct.v4f32 }
-; CHECK: %struct.v4f32 = type { <4 x float> }
-; CHECK: %bitcast_struct_v3f32_v4i32 = type { %struct.v3f32 }
-; CHECK: %bitcast_struct_v4f32_v3f32 = type { %struct.v4f32 }
-; CHECK: %struct.v3f32.f32 = type { <3 x float>, float }
-; CHECK: %bitcast_struct_i128_v4f32 = type { %struct.i128 }
-; CHECK: %struct.i128 = type { i128 }
-; CHECK: %multi_return_bitcast_struct_v3f32_v3f32 = type { %struct.v3f32 }
-
-; CHECK-LABEL: define void @no_ret_blocks() #0 {
-; CHECK-NEXT: unreachable
+
define void @no_ret_blocks() #0 {
unreachable
}
-; CHECK-LABEL: @void_one_out_arg_i32_no_use(
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_no_use(i32* %val) #0 {
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_byval_arg(
-; CHECK-NEXT: store i32 0, i32* %val
-; CHECK-NEXT: ret void
define void @skip_byval_arg(i32* byval(i32) %val) #0 {
store i32 0, i32* %val
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_optnone(
-; CHECK-NEXT: store i32 0, i32* %val
-; CHECK-NEXT: ret void
define void @skip_optnone(i32* byval(i32) %val) #1 {
store i32 0, i32* %val
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_volatile(
-; CHECK-NEXT: store volatile i32 0, i32* %val
-; CHECK-NEXT: ret void
define void @skip_volatile(i32* byval(i32) %val) #0 {
store volatile i32 0, i32* %val
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_atomic(
-; CHECK-NEXT: store atomic i32 0, i32* %val
-; CHECK-NEXT: ret void
define void @skip_atomic(i32* byval(i32) %val) #0 {
store atomic i32 0, i32* %val seq_cst, align 4
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_store_pointer_val(
-; CHECK-NEXT: store i32* %val, i32** undef
-; CHECK-NEXT: ret void
define void @skip_store_pointer_val(i32* %val) #0 {
store i32* %val, i32** undef
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @skip_store_gep(
-; CHECK-NEXT: %gep = getelementptr inbounds i32, i32* %val, i32 1
-; CHECK-NEXT: store i32 0, i32* %gep
-; CHECK-NEXT: ret void
define void @skip_store_gep(i32* %val) #0 {
%gep = getelementptr inbounds i32, i32* %val, i32 1
store i32 0, i32* %gep
ret void
}
-; CHECK-LABEL: define void @skip_sret(i32* sret(i32) %sret, i32* %out) #0 {
-; CHECK-NEXT: store
-; CHECK-NEXT: store
-; CHECK-NEXT: ret void
define void @skip_sret(i32* sret(i32) %sret, i32* %out) #0 {
store i32 1, i32* %sret
store i32 0, i32* %out
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_i32_1_use @void_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %void_one_out_arg_i32_1_use zeroinitializer
-; CHECK-LABEL: @void_one_out_arg_i32_1_use(
-; CHECK-NEXT: %2 = call %void_one_out_arg_i32_1_use @void_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_1_use %2, 0
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 0, i32* %val
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_i32_1_use_align @void_one_out_arg_i32_1_use_align.body(i32* align 8 %val) #0 {
-; CHECK-NEXT: ret %void_one_out_arg_i32_1_use_align zeroinitializer
-; CHECK-LABEL: @void_one_out_arg_i32_1_use_align(
-; CHECK-NEXT: %2 = call %void_one_out_arg_i32_1_use_align @void_one_out_arg_i32_1_use_align.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_1_use_align %2, 0
-; CHECK-NEXT: store i32 %3, i32* %0, align 8
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_1_use_align(i32* align 8 %val) #0 {
store i32 0, i32* %val, align 8
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_i32_2_use @void_one_out_arg_i32_2_use.body(i1 %arg0, i32* %val) #0 {
-; CHECK: br i1 %arg0, label %ret0, label %ret1
-; CHECK: ret0:
-; CHECK-NEXT: ret %void_one_out_arg_i32_2_use zeroinitializer
-; CHECK: ret1:
-; CHECK-NEXT: ret %void_one_out_arg_i32_2_use { i32 9 }
-; CHECK-LABEL: define void @void_one_out_arg_i32_2_use(i1 %0, i32* %1) #2 {
-; CHECK-NEXT: %3 = call %void_one_out_arg_i32_2_use @void_one_out_arg_i32_2_use.body(i1 %0, i32* undef)
-; CHECK-NEXT: %4 = extractvalue %void_one_out_arg_i32_2_use %3, 0
-; CHECK-NEXT: store i32 %4, i32* %1, align 4
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_2_use(i1 %arg0, i32* %val) #0 {
br i1 %arg0, label %ret0, label %ret1
declare void @may.clobber()
-; CHECK-LABEL: define private %void_one_out_arg_i32_2_stores @void_one_out_arg_i32_2_stores.body(i32* %val) #0 {
-; CHECK-NEXT: store i32 0, i32* %val
-; CHECK-NEXT: ret %void_one_out_arg_i32_2_stores { i32 1 }
-; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %void_one_out_arg_i32_2_stores @void_one_out_arg_i32_2_stores.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_2_stores %2, 0
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
define void @void_one_out_arg_i32_2_stores(i32* %val) #0 {
store i32 0, i32* %val
store i32 1, i32* %val
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_i32_2_stores_clobber @void_one_out_arg_i32_2_stores_clobber.body(i32* %val) #0 {
-; CHECK-NEXT: store i32 0, i32* %val
-; CHECK-NEXT: call void @may.clobber()
-; CHECK-NEXT: ret %void_one_out_arg_i32_2_stores_clobber { i32 1 }
-; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores_clobber(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %void_one_out_arg_i32_2_stores_clobber @void_one_out_arg_i32_2_stores_clobber.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_2_stores_clobber %2, 0
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_2_stores_clobber(i32* %val) #0 {
store i32 0, i32* %val
call void @may.clobber()
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @void_one_out_arg_i32_call_may_clobber(i32* %val) #0 {
-; CHECK-NEXT: store i32 0, i32* %val
-; CHECK-NEXT: call void @may.clobber()
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_call_may_clobber(i32* %val) #0 {
store i32 0, i32* %val
call void @may.clobber()
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_i32_pre_call_may_clobber @void_one_out_arg_i32_pre_call_may_clobber.body(i32* %val) #0 {
-; CHECK-NEXT: call void @may.clobber()
-; CHECK-NEXT: ret %void_one_out_arg_i32_pre_call_may_clobber zeroinitializer
-; CHECK-LABEL: @void_one_out_arg_i32_pre_call_may_clobber(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %void_one_out_arg_i32_pre_call_may_clobber @void_one_out_arg_i32_pre_call_may_clobber.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_pre_call_may_clobber %2, 0
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_pre_call_may_clobber(i32* %val) #0 {
call void @may.clobber()
store i32 0, i32* %val
ret void
}
-; CHECK-LABEL: define void @void_one_out_arg_i32_reload(i32* %val) #0 {
-; CHECK: store i32 0, i32* %val
-; CHECK: %load = load i32, i32* %val, align 4
-; CHECK: ret void
define void @void_one_out_arg_i32_reload(i32* %val) #0 {
store i32 0, i32* %val
%load = load i32, i32* %val, align 4
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @void_one_out_arg_i32_store_in_different_block(
-; CHECK-NEXT: %load = load i32, i32 addrspace(1)* undef
-; CHECK-NEXT: store i32 0, i32* %out
-; CHECK-NEXT: br label %ret
-; CHECK: ret:
-; CHECK-NEXT: ret void
define void @void_one_out_arg_i32_store_in_different_block(i32* %out) #0 {
%load = load i32, i32 addrspace(1)* undef
store i32 0, i32* %out
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @unused_out_arg_one_branch(
-; CHECK: ret0:
-; CHECK-NEXT: ret void
-; CHECK: ret1:
-; CHECK-NEXT: store i32 9, i32* %val
-; CHECK-NEXT: ret void
define void @unused_out_arg_one_branch(i1 %arg0, i32* %val) #0 {
br i1 %arg0, label %ret0, label %ret1
ret void
}
-; CHECK-LABEL: define private %void_one_out_arg_v2i32_1_use @void_one_out_arg_v2i32_1_use.body(<2 x i32>* %val) #0 {
-; CHECK-NEXT: ret %void_one_out_arg_v2i32_1_use { <2 x i32> <i32 17, i32 9> }
-; CHECK-LABEL: define void @void_one_out_arg_v2i32_1_use(<2 x i32>* %0) #2 {
-; CHECK-NEXT: %2 = call %void_one_out_arg_v2i32_1_use @void_one_out_arg_v2i32_1_use.body(<2 x i32>* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_v2i32_1_use %2, 0
-; CHECK-NEXT: store <2 x i32> %3, <2 x i32>* %0, align 8
-; CHECK-NEXT: ret void
define void @void_one_out_arg_v2i32_1_use(<2 x i32>* %val) #0 {
store <2 x i32> <i32 17, i32 9>, <2 x i32>* %val
ret void
%struct = type { i32, i8, float }
-; CHECK-LABEL: define private %void_one_out_arg_struct_1_use @void_one_out_arg_struct_1_use.body(%struct* %out) #0 {
-; CHECK-NEXT: ret %void_one_out_arg_struct_1_use { %struct { i32 9, i8 99, float 4.000000e+00 } }
; Normally this is split into element accesses which we don't handle.
-; CHECK-LABEL: define void @void_one_out_arg_struct_1_use(%struct* %0) #2 {
-; CHECK-NEXT: %2 = call %void_one_out_arg_struct_1_use @void_one_out_arg_struct_1_use.body(%struct* undef)
-; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_struct_1_use %2, 0
-; CHECK-NEXT: store %struct %3, %struct* %0, align 4
-; CHECK-NEXT: ret void
define void @void_one_out_arg_struct_1_use(%struct* %out) #0 {
store %struct { i32 9, i8 99, float 4.0 }, %struct* %out
ret void
}
-; CHECK-LABEL: define private %i32_one_out_arg_i32_1_use @i32_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %i32_one_out_arg_i32_1_use { i32 9, i32 24 }
-; CHECK-LABEL: define i32 @i32_one_out_arg_i32_1_use(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %i32_one_out_arg_i32_1_use @i32_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %i32_one_out_arg_i32_1_use %2, 1
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: %4 = extractvalue %i32_one_out_arg_i32_1_use %2, 0
-; CHECK-NEXT: ret i32 %4
define i32 @i32_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 24, i32* %val
ret i32 9
}
-; CHECK-LABEL: define private %unused_different_type @unused_different_type.body(i32* %arg0, float* nocapture %arg1) #0 {
-; CHECK-NEXT: ret %unused_different_type { float 4.000000e+00 }
-; CHECK-LABEL: define void @unused_different_type(i32* %0, float* nocapture %1) #2 {
-; CHECK-NEXT: %3 = call %unused_different_type @unused_different_type.body(i32* %0, float* undef)
-; CHECK-NEXT: %4 = extractvalue %unused_different_type %3, 0
-; CHECK-NEXT: store float %4, float* %1, align 4
-; CHECK-NEXT: ret void
define void @unused_different_type(i32* %arg0, float* nocapture %arg1) #0 {
store float 4.0, float* %arg1, align 4
ret void
}
-; CHECK-LABEL: define private %multiple_same_return_noalias @multiple_same_return_noalias.body(i32* noalias %out0, i32* noalias %out1) #0 {
-; CHECK-NEXT: ret %multiple_same_return_noalias { i32 1, i32 2 }
-; CHECK-LABEL: define void @multiple_same_return_noalias(
-; CHECK-NEXT: %3 = call %multiple_same_return_noalias @multiple_same_return_noalias.body(i32* undef, i32* undef)
-; CHECK-NEXT: %4 = extractvalue %multiple_same_return_noalias %3, 0
-; CHECK-NEXT: store i32 %4, i32* %0, align 4
-; CHECK-NEXT: %5 = extractvalue %multiple_same_return_noalias %3, 1
-; CHECK-NEXT: store i32 %5, i32* %1, align 4
-; CHECK-NEXT: ret void
define void @multiple_same_return_noalias(i32* noalias %out0, i32* noalias %out1) #0 {
store i32 1, i32* %out0, align 4
store i32 2, i32* %out1, align 4
ret void
}
-; CHECK-LABEL: define private %multiple_same_return_mayalias @multiple_same_return_mayalias.body(i32* %out0, i32* %out1) #0 {
-; CHECK-NEXT: ret %multiple_same_return_mayalias { i32 2, i32 1 }
-; CHECK-LABEL: define void @multiple_same_return_mayalias(i32* %0, i32* %1) #2 {
-; CHECK-NEXT: %3 = call %multiple_same_return_mayalias @multiple_same_return_mayalias.body(i32* undef, i32* undef)
-; CHECK-NEXT: %4 = extractvalue %multiple_same_return_mayalias %3, 0
-; CHECK-NEXT: store i32 %4, i32* %0, align 4
-; CHECK-NEXT: %5 = extractvalue %multiple_same_return_mayalias %3, 1
-; CHECK-NEXT: store i32 %5, i32* %1, align 4
-; CHECK-NEXT: ret void
define void @multiple_same_return_mayalias(i32* %out0, i32* %out1) #0 {
- store i32 1, i32* %out0, align 4
- store i32 2, i32* %out1, align 4
- ret void
+ store i32 1, i32* %out0, align 4
+ store i32 2, i32* %out1, align 4
+ ret void
}
-; CHECK-LABEL: define private %multiple_same_return_mayalias_order @multiple_same_return_mayalias_order.body(i32* %out0, i32* %out1) #0 {
-; CHECK-NEXT: ret %multiple_same_return_mayalias_order { i32 1, i32 2 }
-; CHECK-LABEL: define void @multiple_same_return_mayalias_order(i32* %0, i32* %1) #2 {
-; CHECK-NEXT: %3 = call %multiple_same_return_mayalias_order @multiple_same_return_mayalias_order.body(i32* undef, i32* undef)
-; CHECK-NEXT: %4 = extractvalue %multiple_same_return_mayalias_order %3, 0
-; CHECK-NEXT: store i32 %4, i32* %0, align 4
-; CHECK-NEXT: %5 = extractvalue %multiple_same_return_mayalias_order %3, 1
-; CHECK-NEXT: store i32 %5, i32* %1, align 4
-; CHECK-NEXT: ret void
define void @multiple_same_return_mayalias_order(i32* %out0, i32* %out1) #0 {
- store i32 2, i32* %out1, align 4
- store i32 1, i32* %out0, align 4
- ret void
+ store i32 2, i32* %out1, align 4
+ store i32 1, i32* %out0, align 4
+ ret void
}
; Currently this fails to convert because the store won't be found if
; it isn't in the same block as the return.
-; CHECK-LABEL: define i32 @store_in_entry_block(i1 %arg0, i32* %out) #0 {
-; CHECK-NOT: call
define i32 @store_in_entry_block(i1 %arg0, i32* %out) #0 {
entry:
%val0 = load i32, i32 addrspace(1)* undef
ret i32 %phi
}
-; CHECK-LABEL: define private %i1_one_out_arg_i32_1_use @i1_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %i1_one_out_arg_i32_1_use { i1 true, i32 24 }
-; CHECK-LABEL: define i1 @i1_one_out_arg_i32_1_use(i32* %0) #2 {
-; CHECK: %2 = call %i1_one_out_arg_i32_1_use @i1_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK: %3 = extractvalue %i1_one_out_arg_i32_1_use %2, 1
-; CHECK: store i32 %3, i32* %0, align 4
-; CHECK: %4 = extractvalue %i1_one_out_arg_i32_1_use %2, 0
-; CHECK: ret i1 %4
define i1 @i1_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 24, i32* %val
ret i1 true
; Make sure we don't leave around return attributes that are
; incompatible with struct return types.
-; CHECK-LABEL: define private %i1_zeroext_one_out_arg_i32_1_use @i1_zeroext_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %i1_zeroext_one_out_arg_i32_1_use { i1 true, i32 24 }
-; CHECK-LABEL: define zeroext i1 @i1_zeroext_one_out_arg_i32_1_use(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %i1_zeroext_one_out_arg_i32_1_use @i1_zeroext_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %i1_zeroext_one_out_arg_i32_1_use %2, 1
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: %4 = extractvalue %i1_zeroext_one_out_arg_i32_1_use %2, 0
-; CHECK-NEXT: ret i1 %4
define zeroext i1 @i1_zeroext_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 24, i32* %val
ret i1 true
}
-; CHECK-LABEL: define private %i1_signext_one_out_arg_i32_1_use @i1_signext_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %i1_signext_one_out_arg_i32_1_use { i1 true, i32 24 }
-; CHECK-LABEL: define signext i1 @i1_signext_one_out_arg_i32_1_use(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %i1_signext_one_out_arg_i32_1_use @i1_signext_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %i1_signext_one_out_arg_i32_1_use %2, 1
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: %4 = extractvalue %i1_signext_one_out_arg_i32_1_use %2, 0
-; CHECK-NEXT: ret i1 %4
define signext i1 @i1_signext_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 24, i32* %val
ret i1 true
}
-; CHECK-LABEL: define private %p1i32_noalias_one_out_arg_i32_1_use @p1i32_noalias_one_out_arg_i32_1_use.body(i32* %val) #0 {
-; CHECK-NEXT: ret %p1i32_noalias_one_out_arg_i32_1_use { i32 addrspace(1)* null, i32 24 }
-; CHECK-LABEL: define noalias i32 addrspace(1)* @p1i32_noalias_one_out_arg_i32_1_use(i32* %0) #2 {
-; CHECK-NEXT: %2 = call %p1i32_noalias_one_out_arg_i32_1_use @p1i32_noalias_one_out_arg_i32_1_use.body(i32* undef)
-; CHECK-NEXT: %3 = extractvalue %p1i32_noalias_one_out_arg_i32_1_use %2, 1
-; CHECK-NEXT: store i32 %3, i32* %0, align 4
-; CHECK-NEXT: %4 = extractvalue %p1i32_noalias_one_out_arg_i32_1_use %2, 0
-; CHECK-NEXT: ret i32 addrspace(1)* %4
define noalias i32 addrspace(1)* @p1i32_noalias_one_out_arg_i32_1_use(i32* %val) #0 {
store i32 24, i32* %val
ret i32 addrspace(1)* null
}
-; CHECK-LABEL: define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)* %val) #0 {
-; CHECK-NEXT: store i32 0, i32 addrspace(1)* %val
-; CHECK-NEXT: ret void
define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)* %val) #0 {
store i32 0, i32 addrspace(1)* %val
ret void
}
-; CHECK-LABEL: define private %func_ptr_type @func_ptr_type.body(void ()** %out) #0 {
-; CHECK-LABEL: define void @func_ptr_type(void ()** %0) #2 {
-; CHECK: %2 = call %func_ptr_type @func_ptr_type.body(void ()** undef)
define void @func_ptr_type(void()** %out) #0 {
%func = load void()*, void()** undef
store void()* %func, void()** %out
ret void
}
-; CHECK-LABEL: define private %bitcast_func_ptr_type @bitcast_func_ptr_type.body(void ()** %out) #0 {
-; CHECK-LABEL: define void @bitcast_func_ptr_type(void ()** %0) #2 {
define void @bitcast_func_ptr_type(void()** %out) #0 {
%func = load i32()*, i32()** undef
%cast = bitcast void()** %out to i32()**
ret void
}
-; CHECK-LABEL: define private %out_arg_small_array @out_arg_small_array.body([4 x i32]* %val) #0 {
-; CHECK-NEXT: ret %out_arg_small_array { [4 x i32] [i32 0, i32 1, i32 2, i32 3] }
-; CHECK-LABEL: define void @out_arg_small_array([4 x i32]* %0) #2 {
define void @out_arg_small_array([4 x i32]* %val) #0 {
store [4 x i32] [i32 0, i32 1, i32 2, i32 3], [4 x i32]* %val
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @out_arg_large_array([17 x i32]* %val) #0 {
-; CHECK-NEXT: store [17 x i32] zeroinitializer, [17 x i32]* %val
-; CHECK-NEXT: ret void
define void @out_arg_large_array([17 x i32]* %val) #0 {
store [17 x i32] zeroinitializer, [17 x i32]* %val
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define <16 x i32> @num_regs_return_limit(i32* %out, i32 %val) #0 {
define <16 x i32> @num_regs_return_limit(i32* %out, i32 %val) #0 {
%load = load volatile <16 x i32>, <16 x i32> addrspace(1)* undef
store i32 %val, i32* %out
ret <16 x i32> %load
}
-; CHECK-LABEL: define private %num_regs_reach_limit @num_regs_reach_limit.body(i32* %out, i32 %val) #0 {
-; CHECK: define [15 x i32] @num_regs_reach_limit(i32* %0, i32 %1) #2 {
-; CHECK-NEXT: call %num_regs_reach_limit @num_regs_reach_limit.body(i32* undef, i32 %1)
define [15 x i32] @num_regs_reach_limit(i32* %out, i32 %val) #0 {
%load = load volatile [15 x i32], [15 x i32] addrspace(1)* undef
store i32 %val, i32* %out
ret [15 x i32] %load
}
-; CHECK-LABEL: define private %num_regs_reach_limit_leftover @num_regs_reach_limit_leftover.body(i32* %out0, i32* %out1, i32 %val0) #0 {
-; CHECK-NEXT: %load0 = load volatile [15 x i32], [15 x i32] addrspace(1)* undef
-; CHECK-NEXT: %load1 = load volatile i32, i32 addrspace(1)* undef
-; CHECK-NEXT: %1 = insertvalue %num_regs_reach_limit_leftover undef, [15 x i32] %load0, 0
-; CHECK-NEXT: %2 = insertvalue %num_regs_reach_limit_leftover %1, i32 %load1, 1
-; CHECK-NEXT: %3 = insertvalue %num_regs_reach_limit_leftover %2, i32 %val0, 2
-; CHECK-NEXT: ret %num_regs_reach_limit_leftover %3
-
-; CHECK-LABEL: define [15 x i32] @num_regs_reach_limit_leftover(i32* %0, i32* %1, i32 %2) #2 {
-; CHECK-NEXT: %4 = call %num_regs_reach_limit_leftover @num_regs_reach_limit_leftover.body(i32* undef, i32* undef, i32 %2)
-; CHECK-NEXT: %5 = extractvalue %num_regs_reach_limit_leftover %4, 1
-; CHECK-NEXT: store i32 %5, i32* %0, align 4
-; CHECK-NEXT: %6 = extractvalue %num_regs_reach_limit_leftover %4, 2
-; CHECK-NEXT: store i32 %6, i32* %1, align 4
-; CHECK-NEXT: %7 = extractvalue %num_regs_reach_limit_leftover %4, 0
-; CHECK-NEXT: ret [15 x i32] %7
+
define [15 x i32] @num_regs_reach_limit_leftover(i32* %out0, i32* %out1, i32 %val0) #0 {
%load0 = load volatile [15 x i32], [15 x i32] addrspace(1)* undef
%load1 = load volatile i32, i32 addrspace(1)* undef
ret [15 x i32] %load0
}
-; CHECK-LABEL: define private %preserve_debug_info @preserve_debug_info.body(i32 %arg0, i32* %val) #0 {
-; CHECK-NEXT: call void @may.clobber(), !dbg !5
-; CHECK-NEXT: %1 = insertvalue %preserve_debug_info undef, i32 %arg0, 0, !dbg !11
-; CHECK-NEXT: ret %preserve_debug_info %1, !dbg !11
-; CHECK-LABEL: define void @preserve_debug_info(i32 %0, i32* %1) #2 !dbg !6 {
-; CHECK-NEXT: %3 = call %preserve_debug_info @preserve_debug_info.body(i32 %0, i32* undef){{$}}
-; CHECK-NEXT: %4 = extractvalue %preserve_debug_info %3, 0{{$}}
-; CHECK-NEXT: store i32 %4, i32* %1, align 4{{$}}
-; CHECK-NEXT: ret void
define void @preserve_debug_info(i32 %arg0, i32* %val) #0 !dbg !5 {
call void @may.clobber(), !dbg !10
store i32 %arg0, i32* %val, !dbg !11
}
; Clang emits this pattern for 3-vectors for some reason.
-; CHECK-LABEL: define private %bitcast_pointer_v4i32_v3i32 @bitcast_pointer_v4i32_v3i32.body(<3 x i32>* %out) #0 {
-; CHECK-NEXT: %load = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef
-; CHECK-NEXT: %bitcast = bitcast <3 x i32>* %out to <4 x i32>*
-; CHECK-NEXT: %1 = shufflevector <4 x i32> %load, <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
-; CHECK-NEXT: %2 = insertvalue %bitcast_pointer_v4i32_v3i32 undef, <3 x i32> %1, 0
-; CHECK-NEXT: ret %bitcast_pointer_v4i32_v3i32 %2
-
-; CHECK-LABEL: define void @bitcast_pointer_v4i32_v3i32(<3 x i32>* %0) #2 {
-; CHECK-NEXT: %2 = call %bitcast_pointer_v4i32_v3i32 @bitcast_pointer_v4i32_v3i32.body(<3 x i32>* undef)
-; CHECK-NEXT: %3 = extractvalue %bitcast_pointer_v4i32_v3i32 %2, 0
-; CHECK-NEXT: store <3 x i32> %3, <3 x i32>* %0, align 16
-; CHECK-NEXT: ret void
+
define void @bitcast_pointer_v4i32_v3i32(<3 x i32>* %out) #0 {
%load = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef
%bitcast = bitcast <3 x i32>* %out to <4 x i32>*
ret void
}
-; CHECK-LABEL: define private %bitcast_pointer_v4i32_v3f32 @bitcast_pointer_v4i32_v3f32.body(<3 x float>* %out) #0 {
-; CHECK-NEXT: %load = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef
-; CHECK-NEXT: %bitcast = bitcast <3 x float>* %out to <4 x i32>*
-; CHECK-NEXT: %1 = shufflevector <4 x i32> %load, <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
-; CHECK-NEXT: %2 = bitcast <3 x i32> %1 to <3 x float>
-; CHECK-NEXT: %3 = insertvalue %bitcast_pointer_v4i32_v3f32 undef, <3 x float> %2, 0
-; CHECK-NEXT: ret %bitcast_pointer_v4i32_v3f32 %3
define void @bitcast_pointer_v4i32_v3f32(<3 x float>* %out) #0 {
%load = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef
%bitcast = bitcast <3 x float>* %out to <4 x i32>*
; Try different element and bitwidths which could produce broken
; casts.
-; CHECK-LABEL: define private %bitcast_pointer_i32_f32 @bitcast_pointer_i32_f32.body(float* %out) #0 {
-; CHECK-NEXT: %load = load volatile i32, i32 addrspace(1)* undef
-; CHECK-NEXT: %bitcast = bitcast float* %out to i32*
-; CHECK-NEXT: %1 = bitcast i32 %load to float
-; CHECK-NEXT: %2 = insertvalue %bitcast_pointer_i32_f32 undef, float %1, 0
-; CHECK-NEXT: ret %bitcast_pointer_i32_f32 %2
-
-; CHECK-LABEL: define void @bitcast_pointer_i32_f32(float* %0) #2 {
-; CHECK-NEXT: %2 = call %bitcast_pointer_i32_f32 @bitcast_pointer_i32_f32.body(float* undef)
-; CHECK-NEXT: %3 = extractvalue %bitcast_pointer_i32_f32 %2, 0
-; CHECK-NEXT: store float %3, float* %0, align 4
+
define void @bitcast_pointer_i32_f32(float* %out) #0 {
%load = load volatile i32, i32 addrspace(1)* undef
%bitcast = bitcast float* %out to i32*
ret void
}
-; CHECK-LABEL: define void @bitcast_pointer_i32_f16(half* %out) #0 {
-; CHECK-NOT: call
define void @bitcast_pointer_i32_f16(half* %out) #0 {
%load = load volatile i32, i32 addrspace(1)* undef
%bitcast = bitcast half* %out to i32*
ret void
}
-; CHECK-LABEL: define void @bitcast_pointer_f16_i32(i32* %out) #0 {
-; CHECK-NOT: call
define void @bitcast_pointer_f16_i32(i32* %out) #0 {
%load = load volatile half, half addrspace(1)* undef
%bitcast = bitcast i32* %out to half*
%struct.v3f32.f32 = type { <3 x float>, float }
%struct.v4f32 = type { <4 x float> }
-; CHECK-LABEL: define private %bitcast_struct_v3f32_v3f32 @bitcast_struct_v3f32_v3f32.body(%struct.v3f32* %out, <3 x float> %value) #0 {
-; CHECK-NEXT: %extractVec = shufflevector <3 x float> %value, <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
-; CHECK-NEXT: %cast = bitcast %struct.v3f32* %out to <4 x float>*
-; CHECK-NEXT: %1 = shufflevector <4 x float> %extractVec, <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
-; CHECK-NEXT: %2 = insertvalue %struct.v3f32 undef, <3 x float> %1, 0
-; CHECK-NEXT: %3 = insertvalue %bitcast_struct_v3f32_v3f32 undef, %struct.v3f32 %2, 0
-; CHECK-NEXT: ret %bitcast_struct_v3f32_v3f32 %3
-
-; CHECK-LABEL: define void @bitcast_struct_v3f32_v3f32(%struct.v3f32* %0, <3 x float> %1) #2 {
-; CHECK-NEXT: %3 = call %bitcast_struct_v3f32_v3f32 @bitcast_struct_v3f32_v3f32.body(%struct.v3f32* undef, <3 x float> %1)
-; CHECK-NEXT: %4 = extractvalue %bitcast_struct_v3f32_v3f32 %3, 0
-; CHECK-NEXT: store %struct.v3f32 %4, %struct.v3f32* %0, align 16
-; CHECK-NEXT: ret void
+
define void @bitcast_struct_v3f32_v3f32(%struct.v3f32* %out, <3 x float> %value) #0 {
%extractVec = shufflevector <3 x float> %value, <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
%cast = bitcast %struct.v3f32* %out to <4 x float>*
ret void
}
-; CHECK-LABEL: define private %bitcast_struct_v3f32_v3i32 @bitcast_struct_v3f32_v3i32.body(%struct.v3f32* %out, <3 x i32> %value) #0 {
-; CHECK-NEXT: %extractVec = shufflevector <3 x i32> %value, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
-; CHECK-NEXT: %cast = bitcast %struct.v3f32* %out to <4 x i32>*
-; CHECK-NEXT: %1 = shufflevector <4 x i32> %extractVec, <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
-; CHECK-NEXT: %2 = bitcast <3 x i32> %1 to <3 x float>
-; CHECK-NEXT: %3 = insertvalue %struct.v3f32 undef, <3 x float> %2, 0
-; CHECK-NEXT: %4 = insertvalue %bitcast_struct_v3f32_v3i32 undef, %struct.v3f32 %3, 0
-; CHECK-NEXT: ret %bitcast_struct_v3f32_v3i32 %4
-; CHECK-LABEL: define void @bitcast_struct_v3f32_v3i32(%struct.v3f32* %0, <3 x i32> %1) #2 {
-; CHECK-NEXT: %3 = call %bitcast_struct_v3f32_v3i32 @bitcast_struct_v3f32_v3i32.body(%struct.v3f32* undef, <3 x i32> %1)
-; CHECK-NEXT: %4 = extractvalue %bitcast_struct_v3f32_v3i32 %3, 0
-; CHECK-NEXT: store %struct.v3f32 %4, %struct.v3f32* %0, align 16
define void @bitcast_struct_v3f32_v3i32(%struct.v3f32* %out, <3 x i32> %value) #0 {
%extractVec = shufflevector <3 x i32> %value, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
%cast = bitcast %struct.v3f32* %out to <4 x i32>*
ret void
}
-; CHECK-LABEL: define private %bitcast_struct_v4f32_v4f32 @bitcast_struct_v4f32_v4f32.body(%struct.v4f32* %out, <4 x float> %value) #0 {
-; CHECK-NEXT: %cast = bitcast %struct.v4f32* %out to <4 x float>*
-; CHECK-NEXT: %1 = insertvalue %struct.v4f32 undef, <4 x float> %value, 0
-; CHECK-NEXT: %2 = insertvalue %bitcast_struct_v4f32_v4f32 undef, %struct.v4f32 %1, 0
-; CHECK-NEXT: ret %bitcast_struct_v4f32_v4f32 %2
-; CHECK-LABEL: define void @bitcast_struct_v4f32_v4f32(%struct.v4f32* %0, <4 x float> %1) #2 {
-; CHECK-NEXT: %3 = call %bitcast_struct_v4f32_v4f32 @bitcast_struct_v4f32_v4f32.body(%struct.v4f32* undef, <4 x float> %1)
define void @bitcast_struct_v4f32_v4f32(%struct.v4f32* %out, <4 x float> %value) #0 {
%cast = bitcast %struct.v4f32* %out to <4 x float>*
store <4 x float> %value, <4 x float>* %cast, align 16
ret void
}
-; CHECK-LABEL: define private %bitcast_struct_v3f32_v4i32 @bitcast_struct_v3f32_v4i32.body(%struct.v3f32* %out, <4 x i32> %value) #0 {
-; CHECK-LABEL: define void @bitcast_struct_v3f32_v4i32(%struct.v3f32* %0, <4 x i32> %1) #2 {
define void @bitcast_struct_v3f32_v4i32(%struct.v3f32* %out, <4 x i32> %value) #0 {
%cast = bitcast %struct.v3f32* %out to <4 x i32>*
store <4 x i32> %value, <4 x i32>* %cast, align 16
ret void
}
-; CHECK-LABEL: define private %bitcast_struct_v4f32_v3f32 @bitcast_struct_v4f32_v3f32.body(%struct.v4f32* %out, <3 x float> %value) #0 {
-; CHECK-LABEL: define void @bitcast_struct_v4f32_v3f32(%struct.v4f32* %0, <3 x float> %1) #2 {
define void @bitcast_struct_v4f32_v3f32(%struct.v4f32* %out, <3 x float> %value) #0 {
%extractVec = shufflevector <3 x float> %value, <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
%cast = bitcast %struct.v4f32* %out to <4 x float>*
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @bitcast_struct_v3f32_v2f32(%struct.v3f32* %out, <2 x float> %value) #0 {
-; CHECK-NOT: call
define void @bitcast_struct_v3f32_v2f32(%struct.v3f32* %out, <2 x float> %value) #0 {
%cast = bitcast %struct.v3f32* %out to <2 x float>*
store <2 x float> %value, <2 x float>* %cast, align 8
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @bitcast_struct_v3f32_f32_v3f32(%struct.v3f32.f32* %out, <3 x float> %value) #0 {
-; CHECK-NOT: call
define void @bitcast_struct_v3f32_f32_v3f32(%struct.v3f32.f32* %out, <3 x float> %value) #0 {
%extractVec = shufflevector <3 x float> %value, <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
%cast = bitcast %struct.v3f32.f32* %out to <4 x float>*
ret void
}
-; CHECK-NOT: define
-; CHECK-LABEL: define void @bitcast_struct_v3f32_f32_v4f32(%struct.v3f32.f32* %out, <4 x float> %value) #0 {
-; CHECK-NOT: call
define void @bitcast_struct_v3f32_f32_v4f32(%struct.v3f32.f32* %out, <4 x float> %value) #0 {
%cast = bitcast %struct.v3f32.f32* %out to <4 x float>*
store <4 x float> %value, <4 x float>* %cast, align 16
ret void
}
-; CHECK-LABEL: define private %bitcast_struct_i128_v4f32 @bitcast_struct_i128_v4f32.body(%struct.i128* %out, <4 x float> %value) #0 {
-; CHECK-NEXT: %cast = bitcast %struct.i128* %out to <4 x float>*
-; CHECK-NEXT: %1 = bitcast <4 x float> %value to i128
-; CHECK-NEXT: %2 = insertvalue %struct.i128 undef, i128 %1, 0
-; CHECK-NEXT: %3 = insertvalue %bitcast_struct_i128_v4f32 undef, %struct.i128 %2, 0
-; CHECK-NEXT: ret %bitcast_struct_i128_v4f32 %3
define void @bitcast_struct_i128_v4f32(%struct.i128* %out, <4 x float> %value) #0 {
%cast = bitcast %struct.i128* %out to <4 x float>*
store <4 x float> %value, <4 x float>* %cast, align 16
ret void
}
-; CHECK-LABEL: define void @bitcast_struct_i128_v4f32(%struct.i128* %0, <4 x float> %1) #2 {
-; CHECK-NEXT: %3 = call %bitcast_struct_i128_v4f32 @bitcast_struct_i128_v4f32.body(%struct.i128* undef, <4 x float> %1)
define void @bitcast_array_v4i32_v4f32([4 x i32]* %out, [4 x float] %value) #0 {
%cast = bitcast [4 x i32]* %out to [4 x float]*
store [4 x float] %value, [4 x float]* %cast, align 4
ret void
}
-; CHECK-LABEL: define private %multi_return_bitcast_struct_v3f32_v3f32 @multi_return_bitcast_struct_v3f32_v3f32.body(i1 %cond, %struct.v3f32* %out, <3 x float> %value) #0 {
-; CHECK: ret0:
-; CHECK: %cast0 = bitcast %struct.v3f32* %out to <4 x float>*
-; CHECK: %0 = shufflevector <4 x float> %extractVec, <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
-; CHECK: %1 = insertvalue %struct.v3f32 undef, <3 x float> %0, 0
-; CHECK: %2 = insertvalue %multi_return_bitcast_struct_v3f32_v3f32 undef, %struct.v3f32 %1, 0
-; CHECK: ret %multi_return_bitcast_struct_v3f32_v3f32 %2
-; CHECK: ret1:
-; CHECK: %4 = insertvalue %struct.v3f32 undef, <3 x float> %3, 0
-; CHECK: %5 = insertvalue %multi_return_bitcast_struct_v3f32_v3f32 undef, %struct.v3f32 %4, 0
-; CHECK: ret %multi_return_bitcast_struct_v3f32_v3f32 %5
define void @multi_return_bitcast_struct_v3f32_v3f32(i1 %cond, %struct.v3f32* %out, <3 x float> %value) #0 {
entry:
br i1 %cond, label %ret0, label %ret1
ret void
}
-; CHECK-LABEL: define void @bitcast_v3f32_struct_v3f32(<3 x float>* %out, %struct.v3f32 %value) #0 {
-; CHECK-NOT: call
define void @bitcast_v3f32_struct_v3f32(<3 x float>* %out, %struct.v3f32 %value) #0 {
%cast = bitcast <3 x float>* %out to %struct.v3f32*
store %struct.v3f32 %value, %struct.v3f32* %cast, align 4
!11 = !DILocation(line: 2, column: 8, scope: !5)
!12 = !DILocation(line: 3, column: 3, scope: !5)
!13 = !{!"none"}
+
+; CHECK-LABEL: define {{[^@]+}}@no_ret_blocks
+; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: unreachable
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_no_use
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_byval_arg
+; CHECK-SAME: (i32* byval(i32) [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_optnone
+; CHECK-SAME: (i32* byval(i32) [[VAL:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_volatile
+; CHECK-SAME: (i32* byval(i32) [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store volatile i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_atomic
+; CHECK-SAME: (i32* byval(i32) [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store atomic i32 0, i32* [[VAL]] seq_cst, align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_store_pointer_val
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32* [[VAL]], i32** undef, align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_store_gep
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[VAL]], i32 1
+; CHECK-NEXT: store i32 0, i32* [[GEP]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@skip_sret
+; CHECK-SAME: (i32* sret(i32) [[SRET:%.*]], i32* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 1, i32* [[SRET]], align 4
+; CHECK-NEXT: store i32 0, i32* [[OUT]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_1_USE:%.*]] zeroinitializer
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2:[0-9]+]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_1_USE:%.*]] @void_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_1_use_align.body
+; CHECK-SAME: (i32* align 8 [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_1_USE_ALIGN:%.*]] zeroinitializer
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_1_use_align
+; CHECK-SAME: (i32* align 8 [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_1_USE_ALIGN:%.*]] @void_one_out_arg_i32_1_use_align.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_1_USE_ALIGN]] [[TMP2]], 0
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_use.body
+; CHECK-SAME: (i1 [[ARG0:%.*]], i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: br i1 [[ARG0]], label [[RET0:%.*]], label [[RET1:%.*]]
+; CHECK: ret0:
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_2_USE:%.*]] zeroinitializer
+; CHECK: ret1:
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_2_USE]] { i32 9 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_use
+; CHECK-SAME: (i1 [[TMP0:%.*]], i32* [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[VOID_ONE_OUT_ARG_I32_2_USE:%.*]] @void_one_out_arg_i32_2_use.body(i1 [[TMP0]], i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_2_USE]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_stores.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_2_STORES:%.*]] { i32 1 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_stores
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_2_STORES:%.*]] @void_one_out_arg_i32_2_stores.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_2_STORES]] [[TMP2]], 0
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_stores_clobber.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: call void @may.clobber()
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_2_STORES_CLOBBER:%.*]] { i32 1 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_2_stores_clobber
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_2_STORES_CLOBBER:%.*]] @void_one_out_arg_i32_2_stores_clobber.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_2_STORES_CLOBBER]] [[TMP2]], 0
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_call_may_clobber
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: call void @may.clobber()
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_pre_call_may_clobber.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: call void @may.clobber()
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_I32_PRE_CALL_MAY_CLOBBER:%.*]] zeroinitializer
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_pre_call_may_clobber
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_PRE_CALL_MAY_CLOBBER:%.*]] @void_one_out_arg_i32_pre_call_may_clobber.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_PRE_CALL_MAY_CLOBBER]] [[TMP2]], 0
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_reload
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32* [[VAL]], align 4
+; CHECK-NEXT: [[LOAD:%.*]] = load i32, i32* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_store_in_different_block
+; CHECK-SAME: (i32* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: store i32 0, i32* [[OUT]], align 4
+; CHECK-NEXT: br label [[RET:%.*]]
+; CHECK: ret:
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@unused_out_arg_one_branch
+; CHECK-SAME: (i1 [[ARG0:%.*]], i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: br i1 [[ARG0]], label [[RET0:%.*]], label [[RET1:%.*]]
+; CHECK: ret0:
+; CHECK-NEXT: ret void
+; CHECK: ret1:
+; CHECK-NEXT: store i32 9, i32* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_v2i32_1_use.body
+; CHECK-SAME: (<2 x i32>* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_V2I32_1_USE:%.*]] { <2 x i32> <i32 17, i32 9> }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_v2i32_1_use
+; CHECK-SAME: (<2 x i32>* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_V2I32_1_USE:%.*]] @void_one_out_arg_v2i32_1_use.body(<2 x i32>* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_V2I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: store <2 x i32> [[TMP3]], <2 x i32>* [[TMP0]], align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_struct_1_use.body
+; CHECK-SAME: (%struct* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[VOID_ONE_OUT_ARG_STRUCT_1_USE:%.*]] { [[STRUCT:%.*]] { i32 9, i8 99, float 4.000000e+00 } }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_struct_1_use
+; CHECK-SAME: (%struct* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_STRUCT_1_USE:%.*]] @void_one_out_arg_struct_1_use.body(%struct* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_STRUCT_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: store [[STRUCT:%.*]] [[TMP3]], %struct* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i32_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[I32_ONE_OUT_ARG_I32_1_USE:%.*]] { i32 9, i32 24 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i32_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[I32_ONE_OUT_ARG_I32_1_USE:%.*]] @i32_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[I32_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 1
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[I32_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: ret i32 [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@unused_different_type.body
+; CHECK-SAME: (i32* [[ARG0:%.*]], float* nocapture [[ARG1:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[UNUSED_DIFFERENT_TYPE:%.*]] { float 4.000000e+00 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@unused_different_type
+; CHECK-SAME: (i32* [[TMP0:%.*]], float* nocapture [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[UNUSED_DIFFERENT_TYPE:%.*]] @unused_different_type.body(i32* [[TMP0]], float* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[UNUSED_DIFFERENT_TYPE]] [[TMP3]], 0
+; CHECK-NEXT: store float [[TMP4]], float* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_noalias.body
+; CHECK-SAME: (i32* noalias [[OUT0:%.*]], i32* noalias [[OUT1:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[MULTIPLE_SAME_RETURN_NOALIAS:%.*]] { i32 1, i32 2 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_noalias
+; CHECK-SAME: (i32* noalias [[TMP0:%.*]], i32* noalias [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[MULTIPLE_SAME_RETURN_NOALIAS:%.*]] @multiple_same_return_noalias.body(i32* undef, i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_NOALIAS]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_NOALIAS]] [[TMP3]], 1
+; CHECK-NEXT: store i32 [[TMP5]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_mayalias.body
+; CHECK-SAME: (i32* [[OUT0:%.*]], i32* [[OUT1:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[MULTIPLE_SAME_RETURN_MAYALIAS:%.*]] { i32 2, i32 1 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_mayalias
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32* [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[MULTIPLE_SAME_RETURN_MAYALIAS:%.*]] @multiple_same_return_mayalias.body(i32* undef, i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_MAYALIAS]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_MAYALIAS]] [[TMP3]], 1
+; CHECK-NEXT: store i32 [[TMP5]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_mayalias_order.body
+; CHECK-SAME: (i32* [[OUT0:%.*]], i32* [[OUT1:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[MULTIPLE_SAME_RETURN_MAYALIAS_ORDER:%.*]] { i32 1, i32 2 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multiple_same_return_mayalias_order
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32* [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[MULTIPLE_SAME_RETURN_MAYALIAS_ORDER:%.*]] @multiple_same_return_mayalias_order.body(i32* undef, i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_MAYALIAS_ORDER]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[MULTIPLE_SAME_RETURN_MAYALIAS_ORDER]] [[TMP3]], 1
+; CHECK-NEXT: store i32 [[TMP5]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@store_in_entry_block
+; CHECK-SAME: (i1 [[ARG0:%.*]], i32* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[VAL0:%.*]] = load i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: store i32 [[VAL0]], i32* [[OUT]], align 4
+; CHECK-NEXT: br i1 [[ARG0]], label [[IF:%.*]], label [[ENDIF:%.*]]
+; CHECK: if:
+; CHECK-NEXT: [[VAL1:%.*]] = load i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: br label [[ENDIF]]
+; CHECK: endif:
+; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[VAL1]], [[IF]] ]
+; CHECK-NEXT: ret i32 [[PHI]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[I1_ONE_OUT_ARG_I32_1_USE:%.*]] { i1 true, i32 24 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[I1_ONE_OUT_ARG_I32_1_USE:%.*]] @i1_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[I1_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 1
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[I1_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: ret i1 [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_zeroext_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[I1_ZEROEXT_ONE_OUT_ARG_I32_1_USE:%.*]] { i1 true, i32 24 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_zeroext_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[I1_ZEROEXT_ONE_OUT_ARG_I32_1_USE:%.*]] @i1_zeroext_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[I1_ZEROEXT_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 1
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[I1_ZEROEXT_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: ret i1 [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_signext_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[I1_SIGNEXT_ONE_OUT_ARG_I32_1_USE:%.*]] { i1 true, i32 24 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@i1_signext_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[I1_SIGNEXT_ONE_OUT_ARG_I32_1_USE:%.*]] @i1_signext_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[I1_SIGNEXT_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 1
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[I1_SIGNEXT_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: ret i1 [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@p1i32_noalias_one_out_arg_i32_1_use.body
+; CHECK-SAME: (i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[P1I32_NOALIAS_ONE_OUT_ARG_I32_1_USE:%.*]] { i32 addrspace(1)* null, i32 24 }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@p1i32_noalias_one_out_arg_i32_1_use
+; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[P1I32_NOALIAS_ONE_OUT_ARG_I32_1_USE:%.*]] @p1i32_noalias_one_out_arg_i32_1_use.body(i32* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[P1I32_NOALIAS_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 1
+; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[P1I32_NOALIAS_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
+; CHECK-NEXT: ret i32 addrspace(1)* [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@void_one_out_non_private_arg_i32_1_use
+; CHECK-SAME: (i32 addrspace(1)* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store i32 0, i32 addrspace(1)* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@func_ptr_type.body
+; CHECK-SAME: (void ()** [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[FUNC:%.*]] = load void ()*, void ()** undef, align 8
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[FUNC_PTR_TYPE:%.*]] undef, void ()* [[FUNC]], 0
+; CHECK-NEXT: ret [[FUNC_PTR_TYPE]] [[TMP1]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@func_ptr_type
+; CHECK-SAME: (void ()** [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[FUNC_PTR_TYPE:%.*]] @func_ptr_type.body(void ()** undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[FUNC_PTR_TYPE]] [[TMP2]], 0
+; CHECK-NEXT: store void ()* [[TMP3]], void ()** [[TMP0]], align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_func_ptr_type.body
+; CHECK-SAME: (void ()** [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[FUNC:%.*]] = load i32 ()*, i32 ()** undef, align 8
+; CHECK-NEXT: [[CAST:%.*]] = bitcast void ()** [[OUT]] to i32 ()**
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 ()* [[FUNC]] to void ()*
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_FUNC_PTR_TYPE:%.*]] undef, void ()* [[TMP1]], 0
+; CHECK-NEXT: ret [[BITCAST_FUNC_PTR_TYPE]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_func_ptr_type
+; CHECK-SAME: (void ()** [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_FUNC_PTR_TYPE:%.*]] @bitcast_func_ptr_type.body(void ()** undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_FUNC_PTR_TYPE]] [[TMP2]], 0
+; CHECK-NEXT: store void ()* [[TMP3]], void ()** [[TMP0]], align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@out_arg_small_array.body
+; CHECK-SAME: ([4 x i32]* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret [[OUT_ARG_SMALL_ARRAY:%.*]] { [4 x i32] [i32 0, i32 1, i32 2, i32 3] }
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@out_arg_small_array
+; CHECK-SAME: ([4 x i32]* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[OUT_ARG_SMALL_ARRAY:%.*]] @out_arg_small_array.body([4 x i32]* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[OUT_ARG_SMALL_ARRAY]] [[TMP2]], 0
+; CHECK-NEXT: store [4 x i32] [[TMP3]], [4 x i32]* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@out_arg_large_array
+; CHECK-SAME: ([17 x i32]* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: store [17 x i32] zeroinitializer, [17 x i32]* [[VAL]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@num_regs_return_limit
+; CHECK-SAME: (i32* [[OUT:%.*]], i32 [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile <16 x i32>, <16 x i32> addrspace(1)* undef, align 64
+; CHECK-NEXT: store i32 [[VAL]], i32* [[OUT]], align 4
+; CHECK-NEXT: ret <16 x i32> [[LOAD]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@num_regs_reach_limit.body
+; CHECK-SAME: (i32* [[OUT:%.*]], i32 [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile [15 x i32], [15 x i32] addrspace(1)* undef, align 4
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[NUM_REGS_REACH_LIMIT:%.*]] undef, [15 x i32] [[LOAD]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[NUM_REGS_REACH_LIMIT]] [[TMP1]], i32 [[VAL]], 1
+; CHECK-NEXT: ret [[NUM_REGS_REACH_LIMIT]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@num_regs_reach_limit
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[NUM_REGS_REACH_LIMIT:%.*]] @num_regs_reach_limit.body(i32* undef, i32 [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[NUM_REGS_REACH_LIMIT]] [[TMP3]], 1
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[NUM_REGS_REACH_LIMIT]] [[TMP3]], 0
+; CHECK-NEXT: ret [15 x i32] [[TMP5]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@num_regs_reach_limit_leftover.body
+; CHECK-SAME: (i32* [[OUT0:%.*]], i32* [[OUT1:%.*]], i32 [[VAL0:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD0:%.*]] = load volatile [15 x i32], [15 x i32] addrspace(1)* undef, align 4
+; CHECK-NEXT: [[LOAD1:%.*]] = load volatile i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER:%.*]] undef, [15 x i32] [[LOAD0]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP1]], i32 [[LOAD1]], 1
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP2]], i32 [[VAL0]], 2
+; CHECK-NEXT: ret [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP3]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@num_regs_reach_limit_leftover
+; CHECK-SAME: (i32* [[TMP0:%.*]], i32* [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP4:%.*]] = call [[NUM_REGS_REACH_LIMIT_LEFTOVER:%.*]] @num_regs_reach_limit_leftover.body(i32* undef, i32* undef, i32 [[TMP2]])
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP4]], 1
+; CHECK-NEXT: store i32 [[TMP5]], i32* [[TMP0]], align 4
+; CHECK-NEXT: [[TMP6:%.*]] = extractvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP4]], 2
+; CHECK-NEXT: store i32 [[TMP6]], i32* [[TMP1]], align 4
+; CHECK-NEXT: [[TMP7:%.*]] = extractvalue [[NUM_REGS_REACH_LIMIT_LEFTOVER]] [[TMP4]], 0
+; CHECK-NEXT: ret [15 x i32] [[TMP7]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@preserve_debug_info.body
+; CHECK-SAME: (i32 [[ARG0:%.*]], i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: call void @may.clobber(), !dbg [[DBG5:![0-9]+]]
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[PRESERVE_DEBUG_INFO:%.*]] undef, i32 [[ARG0]], 0, !dbg [[DBG11:![0-9]+]]
+; CHECK-NEXT: ret [[PRESERVE_DEBUG_INFO]] [[TMP1]], !dbg [[DBG11]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@preserve_debug_info
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32* [[TMP1:%.*]]) #[[ATTR2]] !dbg [[DBG6:![0-9]+]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[PRESERVE_DEBUG_INFO:%.*]] @preserve_debug_info.body(i32 [[TMP0]], i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[PRESERVE_DEBUG_INFO]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@preserve_metadata.body
+; CHECK-SAME: (i32 [[ARG0:%.*]], i32* [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: call void @may.clobber()
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[PRESERVE_METADATA:%.*]] undef, i32 [[ARG0]], 0
+; CHECK-NEXT: ret [[PRESERVE_METADATA]] [[TMP1]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@preserve_metadata
+; CHECK-SAME: (i32 [[TMP0:%.*]], i32* [[TMP1:%.*]]) #[[ATTR2]] !kernel_arg_access_qual !12 {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[PRESERVE_METADATA:%.*]] @preserve_metadata.body(i32 [[TMP0]], i32* undef)
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[PRESERVE_METADATA]] [[TMP3]], 0
+; CHECK-NEXT: store i32 [[TMP4]], i32* [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3i32.body
+; CHECK-SAME: (<3 x i32>* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef, align 16
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast <3 x i32>* [[OUT]] to <4 x i32>*
+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[LOAD]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3I32:%.*]] undef, <3 x i32> [[TMP1]], 0
+; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3I32]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3i32
+; CHECK-SAME: (<3 x i32>* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_V4I32_V3I32:%.*]] @bitcast_pointer_v4i32_v3i32.body(<3 x i32>* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_V4I32_V3I32]] [[TMP2]], 0
+; CHECK-NEXT: store <3 x i32> [[TMP3]], <3 x i32>* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3f32.body
+; CHECK-SAME: (<3 x float>* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef, align 16
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast <3 x float>* [[OUT]] to <4 x i32>*
+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[LOAD]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
+; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3F32]] [[TMP3]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3f32
+; CHECK-SAME: (<3 x float>* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_V4I32_V3F32:%.*]] @bitcast_pointer_v4i32_v3f32.body(<3 x float>* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_V4I32_V3F32]] [[TMP2]], 0
+; CHECK-NEXT: store <3 x float> [[TMP3]], <3 x float>* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f32.body
+; CHECK-SAME: (float* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast float* [[OUT]] to i32*
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[LOAD]] to float
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_POINTER_I32_F32:%.*]] undef, float [[TMP1]], 0
+; CHECK-NEXT: ret [[BITCAST_POINTER_I32_F32]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f32
+; CHECK-SAME: (float* [[TMP0:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_I32_F32:%.*]] @bitcast_pointer_i32_f32.body(float* undef)
+; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_I32_F32]] [[TMP2]], 0
+; CHECK-NEXT: store float [[TMP3]], float* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f16
+; CHECK-SAME: (half* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile i32, i32 addrspace(1)* undef, align 4
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast half* [[OUT]] to i32*
+; CHECK-NEXT: store i32 [[LOAD]], i32* [[BITCAST]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_f16_i32
+; CHECK-SAME: (i32* [[OUT:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[LOAD:%.*]] = load volatile half, half addrspace(1)* undef, align 2
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast i32* [[OUT]] to half*
+; CHECK-NEXT: store half [[LOAD]], half* [[BITCAST]], align 2
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3f32.body
+; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[EXTRACTVEC]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP1]], 0
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, [[STRUCT_V3F32]] [[TMP2]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3F32]] [[TMP3]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3f32
+; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <3 x float> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V3F32:%.*]] @bitcast_struct_v3f32_v3f32.body(%struct.v3f32* undef, <3 x float> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V3F32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3i32.body
+; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <3 x i32> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x i32> [[VALUE]], <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x i32>*
+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[EXTRACTVEC]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
+; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3I32:%.*]] undef, [[STRUCT_V3F32]] [[TMP3]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3I32]] [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3i32
+; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <3 x i32> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V3I32:%.*]] @bitcast_struct_v3f32_v3i32.body(%struct.v3f32* undef, <3 x i32> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V3I32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v4f32.body
+; CHECK-SAME: (%struct.v4f32* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v4f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V4F32:%.*]] undef, <4 x float> [[VALUE]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V4F32:%.*]] undef, [[STRUCT_V4F32]] [[TMP1]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V4F32]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v4f32
+; CHECK-SAME: (%struct.v4f32* [[TMP0:%.*]], <4 x float> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V4F32_V4F32:%.*]] @bitcast_struct_v4f32_v4f32.body(%struct.v4f32* undef, <4 x float> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V4F32_V4F32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_V4F32:%.*]] [[TMP4]], %struct.v4f32* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v4i32.body
+; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <4 x i32> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x i32>*
+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[VALUE]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
+; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V4I32:%.*]] undef, [[STRUCT_V3F32]] [[TMP3]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V4I32]] [[TMP4]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v4i32
+; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <4 x i32> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V4I32:%.*]] @bitcast_struct_v3f32_v4i32.body(%struct.v3f32* undef, <4 x i32> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V4I32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v3f32.body
+; CHECK-SAME: (%struct.v4f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v4f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V4F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V3F32:%.*]] undef, [[STRUCT_V4F32]] [[TMP1]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V3F32]] [[TMP2]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v3f32
+; CHECK-SAME: (%struct.v4f32* [[TMP0:%.*]], <3 x float> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V4F32_V3F32:%.*]] @bitcast_struct_v4f32_v3f32.body(%struct.v4f32* undef, <3 x float> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V4F32_V3F32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_V4F32:%.*]] [[TMP4]], %struct.v4f32* [[TMP0]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v2f32
+; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <2 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <2 x float>*
+; CHECK-NEXT: store <2 x float> [[VALUE]], <2 x float>* [[CAST]], align 8
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v3f32
+; CHECK-SAME: (%struct.v3f32.f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32.f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: store <4 x float> [[EXTRACTVEC]], <4 x float>* [[CAST]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v4f32
+; CHECK-SAME: (%struct.v3f32.f32* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32.f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: store <4 x float> [[VALUE]], <4 x float>* [[CAST]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_i128_v4f32.body
+; CHECK-SAME: (%struct.i128* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.i128* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x float> [[VALUE]] to i128
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[STRUCT_I128:%.*]] undef, i128 [[TMP1]], 0
+; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_STRUCT_I128_V4F32:%.*]] undef, [[STRUCT_I128]] [[TMP2]], 0
+; CHECK-NEXT: ret [[BITCAST_STRUCT_I128_V4F32]] [[TMP3]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_i128_v4f32
+; CHECK-SAME: (%struct.i128* [[TMP0:%.*]], <4 x float> [[TMP1:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_I128_V4F32:%.*]] @bitcast_struct_i128_v4f32.body(%struct.i128* undef, <4 x float> [[TMP1]])
+; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_I128_V4F32]] [[TMP3]], 0
+; CHECK-NEXT: store [[STRUCT_I128:%.*]] [[TMP4]], %struct.i128* [[TMP0]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_array_v4i32_v4f32
+; CHECK-SAME: ([4 x i32]* [[OUT:%.*]], [4 x float] [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast [4 x i32]* [[OUT]] to [4 x float]*
+; CHECK-NEXT: store [4 x float] [[VALUE]], [4 x float]* [[CAST]], align 4
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multi_return_bitcast_struct_v3f32_v3f32.body
+; CHECK-SAME: (i1 [[COND:%.*]], %struct.v3f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br i1 [[COND]], label [[RET0:%.*]], label [[RET1:%.*]]
+; CHECK: ret0:
+; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
+; CHECK-NEXT: [[CAST0:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[TMP0:%.*]] = shufflevector <4 x float> [[EXTRACTVEC]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP0]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, [[STRUCT_V3F32]] [[TMP1]], 0
+; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP2]]
+; CHECK: ret1:
+; CHECK-NEXT: [[CAST1:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
+; CHECK-NEXT: [[LOAD:%.*]] = load <4 x float>, <4 x float> addrspace(1)* undef, align 16
+; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[LOAD]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
+; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[STRUCT_V3F32]] undef, <3 x float> [[TMP3]], 0
+; CHECK-NEXT: [[TMP5:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] undef, [[STRUCT_V3F32]] [[TMP4]], 0
+; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP5]]
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@multi_return_bitcast_struct_v3f32_v3f32
+; CHECK-SAME: (i1 [[TMP0:%.*]], %struct.v3f32* [[TMP1:%.*]], <3 x float> [[TMP2:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT: [[TMP4:%.*]] = call [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32:%.*]] @multi_return_bitcast_struct_v3f32_v3f32.body(i1 [[TMP0]], %struct.v3f32* undef, <3 x float> [[TMP2]])
+; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP4]], 0
+; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP5]], %struct.v3f32* [[TMP1]], align 16
+; CHECK-NEXT: ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@bitcast_v3f32_struct_v3f32
+; CHECK-SAME: (<3 x float>* [[OUT:%.*]], [[STRUCT_V3F32:%.*]] [[VALUE:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: [[CAST:%.*]] = bitcast <3 x float>* [[OUT]] to %struct.v3f32*
+; CHECK-NEXT: store [[STRUCT_V3F32]] [[VALUE]], %struct.v3f32* [[CAST]], align 4
+; CHECK-NEXT: ret void
+;