summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-11-26 23:04:53 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-11-26 23:04:53 +0000
commit0c617e6026c9b1521aab100662f5c3664dda1768 (patch)
treeb511eef7a8fd485ee5ad32154d35074df1440b83 /test/Transforms
parent1243922fc1a1e3d2681ed9e78503eeabd875ba93 (diff)
downloadllvm-0c617e6026c9b1521aab100662f5c3664dda1768.tar.gz
llvm-0c617e6026c9b1521aab100662f5c3664dda1768.tar.bz2
llvm-0c617e6026c9b1521aab100662f5c3664dda1768.tar.xz
Get rid of the getPointeeAlignment helper function from
InstCombineLoadStoreAlloca.cpp, which had many issues. (At least two bugs were noted on llvm-commits, and it was overly conservative.) Instead, use getOrEnforceKnownAlignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/memcpy-from-global.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/memcpy-from-global.ll b/test/Transforms/InstCombine/memcpy-from-global.ll
index 83c893e17d..557b160a87 100644
--- a/test/Transforms/InstCombine/memcpy-from-global.ll
+++ b/test/Transforms/InstCombine/memcpy-from-global.ll
@@ -134,3 +134,13 @@ define void @test8() {
; CHECK: bar
ret void
}
+
+define void @test9() {
+ %A = alloca %U, align 4
+ %a = bitcast %U* %A to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* bitcast (%U* getelementptr ([2 x %U]* @H, i64 0, i32 1) to i8*), i64 20, i32 4, i1 false)
+ call void @bar(i8* %a) readonly
+; CHECK: @test9
+; CHECK-NEXT: call void @bar(i8* bitcast (%U* getelementptr inbounds ([2 x %U]* @H, i64 0, i64 1) to i8*))
+ ret void
+}