summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/trap.ll
blob: 149c667c8cb7c8b21689e67951b89e492270512f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: llc < %s -march=x86 -mcpu=yonah | FileCheck %s

; CHECK-LABEL: test0:
; CHECK: ud2
define i32 @test0() noreturn nounwind  {
entry:
	tail call void @llvm.trap( )
	unreachable
}

; CHECK-LABEL: test1:
; CHECK: int3
define i32 @test1() noreturn nounwind  {
entry:
	tail call void @llvm.debugtrap( )
	unreachable
}

declare void @llvm.trap() nounwind 
declare void @llvm.debugtrap() nounwind