1; RUN: llc < %s -mtriple=i686-apple-darwin8 -mcpu=yonah | FileCheck %s -check-prefix=DARWIN
2; RUN: llc < %s -mtriple=i686-unknown-linux -mcpu=yonah | FileCheck %s -check-prefix=LINUX
3; RUN: llc < %s -mtriple=x86_64-scei-ps4 | FileCheck %s -check-prefix=PS4
4; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s -check-prefix=WIN64
5
6; DARWIN-LABEL: test0:
7; DARWIN: ud2
8; LINUX-LABEL: test0:
9; LINUX: ud2
10; FIXME: PS4 probably doesn't want two ud2s.
11; PS4-LABEL: test0:
12; PS4: ud2
13; PS4: ud2
14; WIN64-LABEL: test0:
15; WIN64: ud2
16; WIN64-NOT: ud2
17define i32 @test0() noreturn nounwind  {
18entry:
19	tail call void @llvm.trap( )
20	unreachable
21}
22
23; DARWIN-LABEL: test1:
24; DARWIN: int3
25; LINUX-LABEL: test1:
26; LINUX: int3
27; PS4-LABEL: test1:
28; PS4: int     $65
29; WIN64-LABEL: test1:
30; WIN64: int3
31; WIN64-NOT: ud2
32define i32 @test1() noreturn nounwind  {
33entry:
34	tail call void @llvm.debugtrap( )
35	unreachable
36}
37
38declare void @llvm.trap() nounwind
39declare void @llvm.debugtrap() nounwind
40
41