diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2015-08-14 23:03:01 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2015-08-14 23:03:01 +0000 |
| commit | 7332e0455fd40597630f7ec3f36f64258c2f10c8 (patch) | |
| tree | 46a07f6d9fb759c1a546e2f847de6974cf14f265 | |
| parent | 8075fd22b9f65b0d1da3d9aa071115a479c81eb4 (diff) | |
| download | bcm5719-llvm-7332e0455fd40597630f7ec3f36f64258c2f10c8.tar.gz bcm5719-llvm-7332e0455fd40597630f7ec3f36f64258c2f10c8.zip | |
make current codegen visible in the checks, so we can decide if it's right
llvm-svn: 245120
| -rw-r--r-- | llvm/test/CodeGen/X86/memcpy-2.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/memcpy-2.ll b/llvm/test/CodeGen/X86/memcpy-2.ll index 0111c0d433f..1d3033fd77b 100644 --- a/llvm/test/CodeGen/X86/memcpy-2.ll +++ b/llvm/test/CodeGen/X86/memcpy-2.ll @@ -3,6 +3,17 @@ ; RUN: llc < %s -mattr=+sse,-sse2 -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=SSE1 ; RUN: llc < %s -mattr=-sse -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=NOSSE ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=X86-64 +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=nehalem | FileCheck %s -check-prefix=NHM_64 + +;;; TODO: The last run line chooses cpu=nehalem to reveal possible bugs in the "t4" test case. +;;; +;;; Nehalem has a 'fast unaligned memory' attribute, so (1) some of the loads and stores +;;; are certainly unaligned and (2) the first load and first store overlap with the second +;;; load and second store respectively. +;;; +;;; Is either of the sequences ideal? +;;; Is the ideal code being generated for all CPU models? + @.str = internal constant [25 x i8] c"image\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" @.str2 = internal constant [30 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00", align 4 @@ -186,6 +197,13 @@ entry: ; X86-64: movq %rax ; X86-64: movw $120 ; X86-64: movl $2021161080 + +; NHM_64-LABEL: t4: +; NHM_64: movups _.str2+14(%rip), %xmm0 +; NHM_64: movups %xmm0, -26(%rsp) +; NHM_64: movups _.str2(%rip), %xmm0 +; NHM_64: movaps %xmm0, -40(%rsp) + %tmp1 = alloca [30 x i8] %tmp2 = bitcast [30 x i8]* %tmp1 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str2, i32 0, i32 0), i32 30, i32 1, i1 false) |

