diff options
Diffstat (limited to 'test/CodeGen/AMDGPU/trap.ll')
-rw-r--r-- | test/CodeGen/AMDGPU/trap.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/AMDGPU/trap.ll b/test/CodeGen/AMDGPU/trap.ll new file mode 100644 index 0000000000000..1555cfe39b1ea --- /dev/null +++ b/test/CodeGen/AMDGPU/trap.ll @@ -0,0 +1,15 @@ +; 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 } |