diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-03-12 05:59:15 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-03-12 05:59:15 +0000 |
| commit | ef0b7cc2d55939f2e524dea451aff4dc508bd7bc (patch) | |
| tree | 74a894df89dbb341b9c07ca5be1dca88c83a5157 /llvm/test | |
| parent | 7b87e542dc35a3633a5234dc7ebc620cd3e02d63 (diff) | |
| download | bcm5719-llvm-ef0b7cc2d55939f2e524dea451aff4dc508bd7bc.tar.gz bcm5719-llvm-ef0b7cc2d55939f2e524dea451aff4dc508bd7bc.zip | |
On x86, if the only use of a i64 load is a i64 store, generate a pair of double load and store instead.
llvm-svn: 66776
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/i64-mem-copy.ll | 13 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/mmx-copy-gprs.ll | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/X86/i64-mem-copy.ll b/llvm/test/CodeGen/X86/i64-mem-copy.ll new file mode 100644 index 00000000000..ce540112087 --- /dev/null +++ b/llvm/test/CodeGen/X86/i64-mem-copy.ll @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq.*(%rsi), %rax} +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {movsd.*(%eax),} + +; Uses movsd to load / store i64 values in sse2 is available. + +; rdar://6659858 + +define void @foo(i64* %x, i64* %y) nounwind { +entry: + %tmp1 = load i64* %y, align 8 ; <i64> [#uses=1] + store i64 %tmp1, i64* %x, align 8 + ret void +} diff --git a/llvm/test/CodeGen/X86/mmx-copy-gprs.ll b/llvm/test/CodeGen/X86/mmx-copy-gprs.ll index da17a04a466..2047ce75e57 100644 --- a/llvm/test/CodeGen/X86/mmx-copy-gprs.ll +++ b/llvm/test/CodeGen/X86/mmx-copy-gprs.ll @@ -1,11 +1,11 @@ -; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq.*(%rsi), %rax} -; RUN: llvm-as < %s | llc -march=x86 | grep {movl.*4(%eax),} +; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq.*(%rsi), %rax} +; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2 | grep {movl.*4(%eax),} +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {movsd.(%eax),} ; This test should use GPRs to copy the mmx value, not MMX regs. Using mmx regs, ; increases the places that need to use emms. ; rdar://5741668 -target triple = "x86_64-apple-darwin8" define void @foo(<1 x i64>* %x, <1 x i64>* %y) nounwind { entry: |

