summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/trap.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Generic/trap.ll')
-rw-r--r--test/CodeGen/Generic/trap.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/trap.ll b/test/CodeGen/Generic/trap.ll
new file mode 100644
index 00000000000..67d1a7a347f
--- /dev/null
+++ b/test/CodeGen/Generic/trap.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s
+define i32 @test() noreturn nounwind {
+entry:
+ tail call void @llvm.trap( )
+ unreachable
+}
+
+declare void @llvm.trap() nounwind
+