summaryrefslogtreecommitdiffstats
path: root/test/Transforms/ScalarRepl/memcpy-from-global.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/ScalarRepl/memcpy-from-global.ll')
-rw-r--r--test/Transforms/ScalarRepl/memcpy-from-global.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/memcpy-from-global.ll b/test/Transforms/ScalarRepl/memcpy-from-global.ll
index 5b25864..59475ad 100644
--- a/test/Transforms/ScalarRepl/memcpy-from-global.ll
+++ b/test/Transforms/ScalarRepl/memcpy-from-global.ll
@@ -93,4 +93,18 @@ define void @test4() {
ret void
}
+declare void @llvm.lifetime.start(i64, i8*)
+define void @test5() {
+ %A = alloca %T
+ %a = bitcast %T* %A to i8*
+ call void @llvm.lifetime.start(i64 -1, i8* %a)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* bitcast (%T* @G to i8*), i64 124, i32 4, i1 false)
+ call void @baz(i8* byval %a)
+; CHECK: @test5
+; CHECK-NEXT: %a = bitcast %T* @G to i8*
+; CHECK-NEXT: call void @baz(i8* byval %a)
+ ret void
+}
+
+
declare void @baz(i8* byval)
OpenPOWER on IntegriCloud