diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/memcpy.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/memcpy.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/memcpy.ll b/llvm/test/CodeGen/X86/memcpy.ll index 00669443d6d..4351014192b 100644 --- a/llvm/test/CodeGen/X86/memcpy.ll +++ b/llvm/test/CodeGen/X86/memcpy.ll @@ -2,6 +2,7 @@ ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=DARWIN declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind +declare void @llvm.memcpy.p256i8.p256i8.i64(i8 addrspace(256)* nocapture, i8 addrspace(256)* nocapture, i64, i32, i1) nounwind ; Variable memcpy's should lower to calls. @@ -138,3 +139,15 @@ define void @PR15348(i8* %a, i8* %b) { call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 17, i32 0, i1 false) ret void } + +; Memcpys from / to address space 256 should be lowered to appropriate loads / +; stores if small enough. +define void @addrspace256(i8 addrspace(256)* %a, i8 addrspace(256)* %b) nounwind { + tail call void @llvm.memcpy.p256i8.p256i8.i64(i8 addrspace(256)* %a, i8 addrspace(256)* %b, i64 16, i32 8, i1 false) + ret void +; LINUX-LABEL: addrspace256: +; LINUX: movq %gs: +; LINUX: movq %gs: +; LINUX: movq {{.*}}, %gs: +; LINUX: movq {{.*}}, %gs: +} |