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