summaryrefslogtreecommitdiff
path: root/test/CodeGen/XCore/trap.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/XCore/trap.ll')
-rw-r--r--test/CodeGen/XCore/trap.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/trap.ll b/test/CodeGen/XCore/trap.ll
new file mode 100644
index 00000000000..eb71cb6acb6
--- /dev/null
+++ b/test/CodeGen/XCore/trap.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -march=xcore | FileCheck %s
+define i32 @test() noreturn nounwind {
+entry:
+; CHECK: test:
+; CHECK: ldc
+; CHECK: ecallf
+ tail call void @llvm.trap( )
+ unreachable
+}
+
+declare void @llvm.trap() nounwind
+