mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 19:59:57 +00:00
d706d030af
Currently the default C calling convention functions are treated the same as compute kernels. Make this explicit so the default calling convention can be changed to a non-kernel. Converted with perl -pi -e 's/define void/define amdgpu_kernel void/' on the relevant test directories (and undoing in one place that actually wanted a non-kernel). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298444 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
802 B
LLVM
24 lines
802 B
LLVM
; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s
|
|
|
|
; Make sure that AMDGPUPromoteAlloca doesn't crash if the called
|
|
; function is a constantexpr cast of a function.
|
|
|
|
declare void @foo(float*) #0
|
|
declare void @foo.varargs(...) #0
|
|
|
|
; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo
|
|
define amdgpu_kernel void @crash_call_constexpr_cast() #0 {
|
|
%alloca = alloca i32
|
|
call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
|
|
ret void
|
|
}
|
|
|
|
; CHECK: in function crash_call_constexpr_cast{{.*}}: unsupported call to function foo.varargs
|
|
define amdgpu_kernel void @crash_call_constexpr_cast_varargs() #0 {
|
|
%alloca = alloca i32
|
|
call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|