llvm/test/CodeGen/AMDGPU/trap.ll
Matt Arsenault 863cff46f2 AMDGPU: Temporarily select trap to s_endpgm
This should select to s_trap, but that requires
additonal work to setup and enable the trap handler.
For now emit s_endpgm so bugpoint stops getting stuck
on the unsupported call to abort.

Emit a warning that this will only terminate the wave and
not really trap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:27:03 +00:00

16 lines
366 B
LLVM

; RUN: llc -march=amdgcn -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=GCN %s
; GCN: warning: <unknown>:0:0: in function trap void (): trap handler not supported
declare void @llvm.trap() #0
; GCN-LABEL: {{^}}trap:
; GCN: s_endpgm
; GCN-NEXT: s_endpgm
define void @trap() {
call void @llvm.trap()
ret void
}
attributes #0 = { nounwind noreturn }