aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86
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
commit19e46bc119397dcee5b6bcb820687f11a556cacf (patch)
tree63b533ebba90235c7c0b3cf25d950348898320af /test/CodeGen/X86
parent8154ec4cb9d53c3dd5f48642889438f6fae24b2f (diff)
downloadexternal_llvm-19e46bc119397dcee5b6bcb820687f11a556cacf.zip
external_llvm-19e46bc119397dcee5b6bcb820687f11a556cacf.tar.gz
external_llvm-19e46bc119397dcee5b6bcb820687f11a556cacf.tar.bz2
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')
-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 0000000..9a013ff
--- /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
+