68 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-linux -mattr=+waitpkg | FileCheck %s --check-prefix=X643; RUN: llc < %s -mtriple=i386-pc-linux -mattr=+waitpkg | FileCheck %s --check-prefix=X324 5define void @test_umonitor(ptr %address) {6; X64-LABEL: test_umonitor:7; X64: # %bb.0: # %entry8; X64-NEXT: umonitor %rdi9; X64-NEXT: retq10;11; X32-LABEL: test_umonitor:12; X32: # %bb.0: # %entry13; X32-NEXT: movl {{[0-9]+}}(%esp), %eax14; X32-NEXT: umonitor %eax15; X32-NEXT: retl16entry:17 call void @llvm.x86.umonitor(ptr %address)18 ret void19}20 21define i8 @test_umwait(i32 %control, i32 %counter_high, i32 %counter_low) {22; X64-LABEL: test_umwait:23; X64: # %bb.0: # %entry24; X64-NEXT: movl %edx, %eax25; X64-NEXT: movl %esi, %edx26; X64-NEXT: umwait %edi27; X64-NEXT: setb %al28; X64-NEXT: retq29;30; X32-LABEL: test_umwait:31; X32: # %bb.0: # %entry32; X32-NEXT: movl {{[0-9]+}}(%esp), %edx33; X32-NEXT: movl {{[0-9]+}}(%esp), %eax34; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx35; X32-NEXT: umwait %ecx36; X32-NEXT: setb %al37; X32-NEXT: retl38entry:39 call i8 @llvm.x86.umwait(i32 %control, i32 %counter_high, i32 %counter_low)40 ret i8 %041}42 43define i8 @test_tpause(i32 %control, i32 %counter_high, i32 %counter_low) {44; X64-LABEL: test_tpause:45; X64: # %bb.0: # %entry46; X64-NEXT: movl %edx, %eax47; X64-NEXT: movl %esi, %edx48; X64-NEXT: tpause %edi49; X64-NEXT: setb %al50; X64-NEXT: retq51;52; X32-LABEL: test_tpause:53; X32: # %bb.0: # %entry54; X32-NEXT: movl {{[0-9]+}}(%esp), %edx55; X32-NEXT: movl {{[0-9]+}}(%esp), %eax56; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx57; X32-NEXT: tpause %ecx58; X32-NEXT: setb %al59; X32-NEXT: retl60entry:61 call i8 @llvm.x86.tpause(i32 %control, i32 %counter_high, i32 %counter_low)62 ret i8 %063}64 65declare void @llvm.x86.umonitor(ptr)66declare i8 @llvm.x86.umwait(i32, i32, i32)67declare i8 @llvm.x86.tpause(i32, i32, i32)68