use update_llc_test_checks.py to tighten checking
[oota-llvm.git] / test / CodeGen / X86 / i64-mem-copy.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=sse2 | FileCheck %s --check-prefix=X64
2 ; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=sse2 | FileCheck %s --check-prefix=X32
3
4 ; Use movq or movsd to load / store i64 values if sse2 is available.
5 ; rdar://6659858
6
7 define void @foo(i64* %x, i64* %y) {
8 ; X64-LABEL: foo:
9 ; X64:       # BB#0:
10 ; X64-NEXT:    movq (%rsi), %rax
11 ; X64-NEXT:    movq %rax, (%rdi)
12 ; X64-NEXT:    retq
13 ;
14 ; X32-LABEL: foo:
15 ; X32:       # BB#0:
16 ; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
17 ; X32-NEXT:    movl {{[0-9]+}}(%esp), %ecx
18 ; X32-NEXT:    movsd {{.*#+}} xmm0 = mem[0],zero
19 ; X32-NEXT:    movsd %xmm0, (%eax)
20 ; X32-NEXT:    retl
21
22   %tmp1 = load i64, i64* %y, align 8
23   store i64 %tmp1, i64* %x, align 8
24   ret void
25 }
26