summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/trap.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-05-11 00:19:32 +0000
committerDan Gohman <gohman@apple.com>2012-05-11 00:19:32 +0000
commitdfab443ae83958b5a6f0e052e6afbf4ae6d92999 (patch)
treef06fa6e9d3c0d86966e03b360b65bc634b9fa98e /llvm/test/CodeGen/X86/trap.ll
parentf6a6346d67b10d2e1f8fe03986c5180dada1e782 (diff)
downloadbcm5719-llvm-dfab443ae83958b5a6f0e052e6afbf4ae6d92999.tar.gz
bcm5719-llvm-dfab443ae83958b5a6f0e052e6afbf4ae6d92999.zip
Define a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
but it generates int3 on x86 instead of ud2. llvm-svn: 156593
Diffstat (limited to 'llvm/test/CodeGen/X86/trap.ll')
-rw-r--r--llvm/test/CodeGen/X86/trap.ll16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/trap.ll b/llvm/test/CodeGen/X86/trap.ll
index 03ae6bfc869..2020516a883 100644
--- a/llvm/test/CodeGen/X86/trap.ll
+++ b/llvm/test/CodeGen/X86/trap.ll
@@ -1,9 +1,21 @@
-; RUN: llc < %s -march=x86 -mcpu=yonah | grep ud2
-define i32 @test() noreturn nounwind {
+; RUN: llc < %s -march=x86 -mcpu=yonah | FileCheck %s
+
+; CHECK: test0:
+; CHECK: ud2
+define i32 @test0() noreturn nounwind {
entry:
tail call void @llvm.trap( )
unreachable
}
+; CHECK: test1:
+; CHECK: int3
+define i32 @test1() noreturn nounwind {
+entry:
+ tail call void @llvm.debugger( )
+ unreachable
+}
+
declare void @llvm.trap() nounwind
+declare void @llvm.debugger() nounwind
OpenPOWER on IntegriCloud