Simon Pilgrim | 5009a1c | 2017-12-15 14:37:28 +0000 | [diff] [blame^] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+rtm | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC |
| 3 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE --check-prefix=SKL |
| 4 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skx | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE --check-prefix=SKX |
| 5 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=cannonlake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE --check-prefix=CNL |
| 6 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=icelake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE --check-prefix=ICL |
| 7 | |
| 8 | define i32 @test_xbegin() nounwind uwtable { |
| 9 | ; GENERIC-LABEL: test_xbegin: |
| 10 | ; GENERIC: # %bb.0: |
| 11 | ; GENERIC-NEXT: xbegin .LBB0_2 # sched: [100:0.33] |
| 12 | ; GENERIC-NEXT: # %bb.1: |
| 13 | ; GENERIC-NEXT: movl $-1, %eax # sched: [1:0.33] |
| 14 | ; GENERIC-NEXT: retq # sched: [1:1.00] |
| 15 | ; GENERIC-NEXT: .LBB0_2: |
| 16 | ; GENERIC-NEXT: # XABORT DEF # sched: [100:0.33] |
| 17 | ; GENERIC-NEXT: retq # sched: [1:1.00] |
| 18 | ; |
| 19 | ; SKYLAKE-LABEL: test_xbegin: |
| 20 | ; SKYLAKE: # %bb.0: |
| 21 | ; SKYLAKE-NEXT: xbegin .LBB0_2 # sched: [100:0.25] |
| 22 | ; SKYLAKE-NEXT: # %bb.1: |
| 23 | ; SKYLAKE-NEXT: movl $-1, %eax # sched: [1:0.25] |
| 24 | ; SKYLAKE-NEXT: retq # sched: [7:1.00] |
| 25 | ; SKYLAKE-NEXT: .LBB0_2: |
| 26 | ; SKYLAKE-NEXT: # XABORT DEF # sched: [100:0.25] |
| 27 | ; SKYLAKE-NEXT: retq # sched: [7:1.00] |
| 28 | %1 = tail call i32 @llvm.x86.xbegin() nounwind |
| 29 | ret i32 %1 |
| 30 | } |
| 31 | declare i32 @llvm.x86.xbegin() nounwind |
| 32 | |
| 33 | define void @test_xend() nounwind uwtable { |
| 34 | ; GENERIC-LABEL: test_xend: |
| 35 | ; GENERIC: # %bb.0: |
| 36 | ; GENERIC-NEXT: xend # sched: [100:0.33] |
| 37 | ; GENERIC-NEXT: retq # sched: [1:1.00] |
| 38 | ; |
| 39 | ; SKYLAKE-LABEL: test_xend: |
| 40 | ; SKYLAKE: # %bb.0: |
| 41 | ; SKYLAKE-NEXT: xend # sched: [100:0.25] |
| 42 | ; SKYLAKE-NEXT: retq # sched: [7:1.00] |
| 43 | tail call void @llvm.x86.xend() nounwind |
| 44 | ret void |
| 45 | } |
| 46 | declare void @llvm.x86.xend() nounwind |
| 47 | |
| 48 | define void @test_xabort() nounwind uwtable { |
| 49 | ; GENERIC-LABEL: test_xabort: |
| 50 | ; GENERIC: # %bb.0: |
| 51 | ; GENERIC-NEXT: xabort $2 # sched: [100:0.33] |
| 52 | ; GENERIC-NEXT: retq # sched: [1:1.00] |
| 53 | ; |
| 54 | ; SKYLAKE-LABEL: test_xabort: |
| 55 | ; SKYLAKE: # %bb.0: |
| 56 | ; SKYLAKE-NEXT: xabort $2 # sched: [100:0.25] |
| 57 | ; SKYLAKE-NEXT: retq # sched: [7:1.00] |
| 58 | tail call void @llvm.x86.xabort(i8 2) |
| 59 | ret void |
| 60 | } |
| 61 | declare void @llvm.x86.xabort(i8) nounwind |