Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mattr=+rtm -mtriple=x86_64-unknown-unknown | FileCheck %s
      2 
      3 declare i32 @llvm.x86.xbegin() nounwind
      4 declare void @llvm.x86.xend() nounwind
      5 declare void @llvm.x86.xabort(i8) nounwind
      6 declare void @f1()
      7 
      8 define i32 @test_xbegin() nounwind uwtable {
      9 entry:
     10   %0 = tail call i32 @llvm.x86.xbegin() nounwind
     11   ret i32 %0
     12 ; CHECK: test_xbegin
     13 ; CHECK: xbegin [[LABEL:.*BB.*]]
     14 ; CHECK: [[LABEL]]:
     15 }
     16 
     17 define void @test_xend() nounwind uwtable {
     18 entry:
     19   tail call void @llvm.x86.xend() nounwind
     20   ret void
     21 ; CHECK: test_xend
     22 ; CHECK: xend
     23 }
     24 
     25 define void @test_xabort() nounwind uwtable {
     26 entry:
     27   tail call void @llvm.x86.xabort(i8 2)
     28   ret void
     29 ; CHECK: test_xabort
     30 ; CHECK: xabort $2
     31 }
     32 
     33 define void @f2(i32 %x) nounwind uwtable {
     34 entry:
     35   %x.addr = alloca i32, align 4
     36   store i32 %x, i32* %x.addr, align 4
     37   call void @llvm.x86.xabort(i8 1)
     38   call void @f1()
     39   ret void
     40 ; CHECK-LABEL: f2
     41 ; CHECK: xabort  $1
     42 ; CHECK: callq   f1
     43 }
     44