Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc < %s -mtriple=i686-linux -mattr=+sse3 | FileCheck %s -check-prefixes=CHECK,X86
      3 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse3 | FileCheck %s -check-prefixes=CHECK,X64
      4 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse3 | FileCheck %s -check-prefixes=CHECK,WIN64
      5 
      6 ; PR8573
      7 
      8 define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
      9 ; X86-LABEL: foo:
     10 ; X86:       # %bb.0: # %entry
     11 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
     12 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
     13 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
     14 ; X86-NEXT:    leal (%eax), %eax
     15 ; X86-NEXT:    monitor
     16 ; X86-NEXT:    retl
     17 ;
     18 ; X64-LABEL: foo:
     19 ; X64:       # %bb.0: # %entry
     20 ; X64-NEXT:    leaq (%rdi), %rax
     21 ; X64-NEXT:    movl %esi, %ecx
     22 ; X64-NEXT:    monitor
     23 ; X64-NEXT:    retq
     24 ;
     25 ; WIN64-LABEL: foo:
     26 ; WIN64:       # %bb.0: # %entry
     27 ; WIN64-NEXT:    leaq (%rcx), %rax
     28 ; WIN64-NEXT:    movl %edx, %ecx
     29 ; WIN64-NEXT:    movl %r8d, %edx
     30 ; WIN64-NEXT:    monitor
     31 ; WIN64-NEXT:    retq
     32 entry:
     33   tail call void @llvm.x86.sse3.monitor(i8* %P, i32 %E, i32 %H)
     34   ret void
     35 }
     36 
     37 declare void @llvm.x86.sse3.monitor(i8*, i32, i32) nounwind
     38 
     39 define void @bar(i32 %E, i32 %H) nounwind {
     40 ; X86-LABEL: bar:
     41 ; X86:       # %bb.0: # %entry
     42 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
     43 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
     44 ; X86-NEXT:    mwait
     45 ; X86-NEXT:    retl
     46 ;
     47 ; X64-LABEL: bar:
     48 ; X64:       # %bb.0: # %entry
     49 ; X64-NEXT:    movl %edi, %ecx
     50 ; X64-NEXT:    movl %esi, %eax
     51 ; X64-NEXT:    mwait
     52 ; X64-NEXT:    retq
     53 ;
     54 ; WIN64-LABEL: bar:
     55 ; WIN64:       # %bb.0: # %entry
     56 ; WIN64-NEXT:    movl %edx, %eax
     57 ; WIN64-NEXT:    mwait
     58 ; WIN64-NEXT:    retq
     59 entry:
     60   tail call void @llvm.x86.sse3.mwait(i32 %E, i32 %H)
     61   ret void
     62 }
     63 
     64 declare void @llvm.x86.sse3.mwait(i32, i32) nounwind
     65