summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit915ec1407301e7bdbfdb1bfbfa19211d3eb322bc (patch)
treee896ad9bc1b7135fe105fceda1dbcad4a04d8666 /llvm/test/CodeGen/X86/trap.ll
parentabefc391dd699bff1d1aa41ea0a8b26647b71a18 (diff)
downloadbcm5719-llvm-915ec1407301e7bdbfdb1bfbfa19211d3eb322bc.tar.gz
bcm5719-llvm-915ec1407301e7bdbfdb1bfbfa19211d3eb322bc.zip
verify x86 generates ud2 for llvm.trap
llvm-svn: 46023
Diffstat (limited to 'llvm/test/CodeGen/X86/trap.ll')
-rw-r--r--llvm/test/CodeGen/X86/trap.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/trap.ll b/llvm/test/CodeGen/X86/trap.ll
new file mode 100644
index 00000000000..9a013ffbe56
--- /dev/null
+++ b/llvm/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
+
OpenPOWER on IntegriCloud