Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=prescott | FileCheck %s --check-prefix=PRESCOTT
      2 ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=nehalem | FileCheck %s --check-prefix=NEHALEM
      3 
      4 ;;; TODO: (1) Some of the loads and stores are certainly unaligned and (2) the first load and first
      5 ;;; store overlap with the second load and second store respectively.
      6 ;;;
      7 ;;; Is either of these sequences ideal? 
      8 
      9 define float @foo(i8* nocapture %buf, float %a, float %b) nounwind uwtable {
     10 ; PRESCOTT-LABEL: foo:
     11 ; PRESCOTT:       # BB#0: # %entry
     12 ; PRESCOTT-NEXT:    movq   .Ltmp0+14(%rip), %rax
     13 ; PRESCOTT-NEXT:    movq   %rax, 14(%rdi)
     14 ; PRESCOTT-NEXT:    movq   .Ltmp0+8(%rip), %rax
     15 ; PRESCOTT-NEXT:    movq   %rax, 8(%rdi)
     16 ; PRESCOTT-NEXT:    movq   .Ltmp0(%rip), %rax
     17 ; PRESCOTT-NEXT:    movq   %rax, (%rdi)
     18 ;
     19 ; NEHALEM-LABEL: foo:
     20 ; NEHALEM:       # BB#0: # %entry
     21 ; NEHALEM-NEXT:    movq .Ltmp0+14(%rip), %rax
     22 ; NEHALEM-NEXT:    movq %rax, 14(%rdi)
     23 ; NEHALEM-NEXT:    movups .Ltmp0(%rip), %xmm2
     24 ; NEHALEM-NEXT:    movups %xmm2, (%rdi)
     25 
     26 entry:
     27   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %buf, i8* blockaddress(@foo, %out), i64 22, i32 1, i1 false)
     28   br label %out
     29 
     30 out:                                              ; preds = %entry
     31   %add = fadd float %a, %b
     32   ret float %add
     33 }
     34 
     35 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
     36