1; RUN: llc < %s -mattr=+rtm -mtriple=x86_64-unknown-unknown | FileCheck %s
2
3declare i32 @llvm.x86.xbegin() nounwind
4declare void @llvm.x86.xend() nounwind
5declare void @llvm.x86.xabort(i8) noreturn nounwind
6
7define i32 @test_xbegin() nounwind uwtable {
8entry:
9  %0 = tail call i32 @llvm.x86.xbegin() nounwind
10  ret i32 %0
11; CHECK: test_xbegin
12; CHECK: xbegin [[LABEL:.*BB.*]]
13; CHECK: [[LABEL]]:
14}
15
16define void @test_xend() nounwind uwtable {
17entry:
18  tail call void @llvm.x86.xend() nounwind
19  ret void
20; CHECK: test_xend
21; CHECK: xend
22}
23
24define void @test_xabort() nounwind uwtable {
25entry:
26  tail call void @llvm.x86.xabort(i8 2)
27  unreachable
28; CHECK: test_xabort
29; CHECK: xabort $2
30}
31