mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
a4a23eae96
The exit-on-error flag was necessary in order to avoid an assertion when handling DYNAMIC_STACKALLOC nodes in SelectionDAGLegalize. We can avoid the assertion by creating some dummy nodes. This enables us to remove the exit-on-error flag on the first 2 run lines (SI), but on the third run line (R600) we would run into another assertion when trying to reserve indirect registers. This patch also replaces that assertion with an early exit from the function. Fixes PR27761. Differential Revision: http://reviews.llvm.org/D20852 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273550 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
774 B
LLVM
24 lines
774 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 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 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 }
|