1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+waitpkg | FileCheck %s --check-prefix=X64
3 ; RUN: llc < %s -mtriple=i386-pc-linux -mattr=+waitpkg | FileCheck %s --check-prefix=X32
5 define void @test_umonitor(i8* %address) {
6 ; X64-LABEL: test_umonitor:
7 ; X64: # %bb.0: # %entry
8 ; X64-NEXT: umonitor %rdi
11 ; X32-LABEL: test_umonitor:
12 ; X32: # %bb.0: # %entry
13 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
14 ; X32-NEXT: umonitor %eax
17 call void @llvm.x86.umonitor(i8* %address)
21 define i8 @test_umwait(i32 %control, i32 %counter_high, i32 %counter_low) {
22 ; X64-LABEL: test_umwait:
23 ; X64: # %bb.0: # %entry
24 ; X64-NEXT: movl %edx, %eax
25 ; X64-NEXT: movl %esi, %edx
26 ; X64-NEXT: umwait %edi
30 ; X32-LABEL: test_umwait:
31 ; X32: # %bb.0: # %entry
32 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
33 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
34 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
35 ; X32-NEXT: umwait %ecx
39 call i8 @llvm.x86.umwait(i32 %control, i32 %counter_high, i32 %counter_low)
43 define i8 @test_tpause(i32 %control, i32 %counter_high, i32 %counter_low) {
44 ; X64-LABEL: test_tpause:
45 ; X64: # %bb.0: # %entry
46 ; X64-NEXT: movl %edx, %eax
47 ; X64-NEXT: movl %esi, %edx
48 ; X64-NEXT: tpause %edi
52 ; X32-LABEL: test_tpause:
53 ; X32: # %bb.0: # %entry
54 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
55 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
56 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
57 ; X32-NEXT: tpause %ecx
61 call i8 @llvm.x86.tpause(i32 %control, i32 %counter_high, i32 %counter_low)
65 declare void @llvm.x86.umonitor(i8*)
66 declare i8 @llvm.x86.umwait(i32, i32, i32)
67 declare i8 @llvm.x86.tpause(i32, i32, i32)