summaryrefslogtreecommitdiffstats
path: root/test/Transforms/MemCpyOpt/memcpy.ll
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-04-23 16:57:46 -0700
committerStephen Hines <srhines@google.com>2014-04-24 15:53:16 -0700
commit36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch)
treee6cfb69fbbd937f450eeb83bfb83b9da3b01275a /test/Transforms/MemCpyOpt/memcpy.ll
parent69a8640022b04415ae9fac62f8ab090601d8f889 (diff)
downloadexternal_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip
external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz
external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'test/Transforms/MemCpyOpt/memcpy.ll')
-rw-r--r--test/Transforms/MemCpyOpt/memcpy.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/MemCpyOpt/memcpy.ll b/test/Transforms/MemCpyOpt/memcpy.ll
index 2417cd1..492c453 100644
--- a/test/Transforms/MemCpyOpt/memcpy.ll
+++ b/test/Transforms/MemCpyOpt/memcpy.ll
@@ -78,6 +78,7 @@ define void @test4(i8 *%P) {
declare void @test4a(i8* align 1 byval)
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* nocapture, i8 addrspace(1)* nocapture, i64, i32, i1) nounwind
%struct.S = type { i128, [4 x i8]}
@@ -152,6 +153,22 @@ declare noalias i8* @malloc(i32)
; rdar://11341081
%struct.big = type { [50 x i32] }
+define void @test9_addrspacecast() nounwind ssp uwtable {
+entry:
+; CHECK-LABEL: @test9_addrspacecast(
+; CHECK: f1
+; CHECK-NOT: memcpy
+; CHECK: f2
+ %b = alloca %struct.big, align 4
+ %tmp = alloca %struct.big, align 4
+ call void @f1(%struct.big* sret %tmp)
+ %0 = addrspacecast %struct.big* %b to i8 addrspace(1)*
+ %1 = addrspacecast %struct.big* %tmp to i8 addrspace(1)*
+ call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %0, i8 addrspace(1)* %1, i64 200, i32 4, i1 false)
+ call void @f2(%struct.big* %b)
+ ret void
+}
+
define void @test9() nounwind ssp uwtable {
entry:
; CHECK: test9