1 ; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s
3 ; Make sure that AMDGPUPromoteAlloca doesn't crash if the called
4 ; function is a constantexpr cast of a function.
6 declare void @foo(float*) #0
7 declare void @foo.varargs(...) #0
9 ; CHECK: error: unsupported call to function foo in crash_call_constexpr_cast
10 define void @crash_call_constexpr_cast() #0 {
12 call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
16 define void @crash_call_constexpr_cast_varargs() #0 {
18 call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
22 attributes #0 = { nounwind }