54 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-linux -mattr=+mwaitx | FileCheck %s3; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+mwaitx | FileCheck %s -check-prefix=WIN644; RUN: llc < %s -mtriple=x86_64-linux -mcpu=bdver4 | FileCheck %s5; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=bdver4 | FileCheck %s -check-prefix=WIN646 7define void @foo(ptr %P, i32 %E, i32 %H) nounwind {8; CHECK-LABEL: foo:9; CHECK: # %bb.0: # %entry10; CHECK-NEXT: movl %esi, %ecx11; CHECK-NEXT: movq %rdi, %rax12; CHECK-NEXT: monitorx13; CHECK-NEXT: retq14;15; WIN64-LABEL: foo:16; WIN64: # %bb.0: # %entry17; WIN64-NEXT: movq %rcx, %rax18; WIN64-NEXT: movl %edx, %ecx19; WIN64-NEXT: movl %r8d, %edx20; WIN64-NEXT: monitorx21; WIN64-NEXT: retq22entry:23 tail call void @llvm.x86.monitorx(ptr %P, i32 %E, i32 %H)24 ret void25}26 27declare void @llvm.x86.monitorx(ptr, i32, i32) nounwind28 29define void @bar(i32 %E, i32 %H, i32 %C) nounwind {30; CHECK-LABEL: bar:31; CHECK: # %bb.0: # %entry32; CHECK-NEXT: pushq %rbx33; CHECK-NEXT: movl %esi, %eax34; CHECK-NEXT: movl %edi, %ecx35; CHECK-NEXT: movl %edx, %ebx36; CHECK-NEXT: mwaitx37; CHECK-NEXT: popq %rbx38; CHECK-NEXT: retq39;40; WIN64-LABEL: bar:41; WIN64: # %bb.0: # %entry42; WIN64-NEXT: pushq %rbx43; WIN64-NEXT: movl %edx, %eax44; WIN64-NEXT: movl %r8d, %ebx45; WIN64-NEXT: mwaitx46; WIN64-NEXT: popq %rbx47; WIN64-NEXT: retq48entry:49 tail call void @llvm.x86.mwaitx(i32 %E, i32 %H, i32 %C)50 ret void51}52 53declare void @llvm.x86.mwaitx(i32, i32, i32) nounwind54