1 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+mwaitx | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+mwaitx | FileCheck %s -check-prefix=WIN64
3 ; RUN: llc < %s -mtriple=x86_64-linux -mcpu=bdver4 | FileCheck %s
4 ; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=bdver4 | FileCheck %s -check-prefix=WIN64
7 ; CHECK-LABEL: # %bb.0:
8 ; CHECK-DAG: leaq (%rdi), %rax
9 ; CHECK-DAG: movl %esi, %ecx
10 ; CHECK-NEXT: monitorx
12 ; WIN64: leaq (%rcx), %rax
13 ; WIN64-NEXT: movl %edx, %ecx
14 ; WIN64-NEXT: movl %r8d, %edx
15 ; WIN64-NEXT: monitorx
16 define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
18 tail call void @llvm.x86.monitorx(i8* %P, i32 %E, i32 %H)
22 declare void @llvm.x86.monitorx(i8*, i32, i32) nounwind
26 ; CHECK-DAG: movl %edi, %ecx
27 ; CHECK-DAG: movl %esi, %eax
28 ; CHECK-DAG: movl %edx, %ebx
32 ; WIN64-DAG: movl %edx, %eax
33 ; WIN64-DAG: movl %r8d, %ebx
35 define void @bar(i32 %E, i32 %H, i32 %C) nounwind {
37 tail call void @llvm.x86.mwaitx(i32 %E, i32 %H, i32 %C)
41 declare void @llvm.x86.mwaitx(i32, i32, i32) nounwind