1 ; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s
3 ; FIXME: Error is misleading because it's not an indirect call.
5 ; CHECK: error: <unknown>:0:0: in function crash_call_constexpr_cast void (): unsupported indirect call to function foo
7 ; Make sure that AMDGPUPromoteAlloca doesn't crash if the called
8 ; function is a constantexpr cast of a function.
10 declare void @foo(float*) #0
11 declare void @foo.varargs(...) #0
13 ; XCHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo
14 define amdgpu_kernel void @crash_call_constexpr_cast() #0 {
16 call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
20 ; XCHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo.varargs
21 define amdgpu_kernel void @crash_call_constexpr_cast_varargs() #0 {
23 call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
27 attributes #0 = { nounwind }