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: leaq (%rdi), %rax
8 ; CHECK-NEXT: movl %esi, %ecx
11 ; WIN64: leaq (%rcx), %rax
12 ; WIN64-NEXT: movl %edx, %ecx
13 ; WIN64-NEXT: movl %r8d, %edx
14 ; WIN64-NEXT: monitorx
15 define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
17 tail call void @llvm.x86.monitorx(i8* %P, i32 %E, i32 %H)
21 declare void @llvm.x86.monitorx(i8*, i32, i32) nounwind
24 ; CHECK: movl %edi, %ecx
25 ; CHECK-NEXT: movl %esi, %eax
26 ; CHECK-NEXT: movl %edx, %ebx
29 ; WIN64: movl %edx, %eax
30 ; WIN64: movl %r8d, %ebx
32 define void @bar(i32 %E, i32 %H, i32 %C) nounwind {
34 tail call void @llvm.x86.mwaitx(i32 %E, i32 %H, i32 %C)
38 declare void @llvm.x86.mwaitx(i32, i32, i32) nounwind