|
1 |
| -; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64 |
2 |
| -; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=X64 |
3 |
| -; X64: movq ({{%rsi|%rdx}}), %r |
4 |
| - |
5 |
| -; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=X32 |
6 |
| -; X32: movsd ({{%ecx|%eax}}), %xmm |
7 |
| - |
8 |
| -; Uses movsd to load / store i64 values if sse2 is available. |
| 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 |
9 | 3 |
|
| 4 | +; Use movq or movsd to load / store i64 values if sse2 is available. |
10 | 5 | ; rdar://6659858
|
11 | 6 |
|
12 |
| -define void @foo(i64* %x, i64* %y) nounwind { |
13 |
| -entry: |
14 |
| - %tmp1 = load i64, i64* %y, align 8 ; <i64> [#uses=1] |
15 |
| - store i64 %tmp1, i64* %x, align 8 |
16 |
| - ret void |
| 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 |
17 | 25 | }
|
| 26 | + |
0 commit comments