summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/trap.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-15 22:22:02 +0000
committerChris Lattner <sabre@nondot.org>2008-01-15 22:22:02 +0000
commite07704fc84bad763348302ea90b9a9c86a89d508 (patch)
tree63b533ebba90235c7c0b3cf25d950348898320af /test/CodeGen/X86/trap.ll
parent426df7538d1d89eac4fe3b56a74a9febcea6b196 (diff)
downloadllvm-e07704fc84bad763348302ea90b9a9c86a89d508.tar.gz
llvm-e07704fc84bad763348302ea90b9a9c86a89d508.tar.bz2
llvm-e07704fc84bad763348302ea90b9a9c86a89d508.tar.xz
verify x86 generates ud2 for llvm.trap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/trap.ll')
-rw-r--r--test/CodeGen/X86/trap.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/trap.ll b/test/CodeGen/X86/trap.ll
new file mode 100644
index 0000000000..9a013ffbe5
--- /dev/null
+++ b/test/CodeGen/X86/trap.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | grep ud2
+define i32 @test() noreturn nounwind {
+entry:
+ tail call void @llvm.trap( )
+ unreachable
+}
+
+declare void @llvm.trap() nounwind
+