summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-11-18 05:39:39 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-11-18 05:39:39 +0000
commit294c965146d8fe4dfda4e3e57e7bd34ab64a6231 (patch)
treeb00932c3fe677d9e1b5d491045dc55343d685947 /test/Transforms
parent5d6d89544de3ce0b919f540c3ca8ff8226b902c3 (diff)
downloadllvm-294c965146d8fe4dfda4e3e57e7bd34ab64a6231.tar.gz
llvm-294c965146d8fe4dfda4e3e57e7bd34ab64a6231.tar.bz2
llvm-294c965146d8fe4dfda4e3e57e7bd34ab64a6231.tar.xz
Don't try to calculate the alignment of an unsigned type. Fixes PR14371!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/alloca.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/alloca.ll b/test/Transforms/InstCombine/alloca.ll
index 50e03479f6..68a671cec8 100644
--- a/test/Transforms/InstCombine/alloca.ll
+++ b/test/Transforms/InstCombine/alloca.ll
@@ -94,3 +94,19 @@ entry:
tail call void @f(i32* %b)
ret void
}
+
+; PR14371
+%opaque_type = type opaque
+%real_type = type { { i32, i32* } }
+
+@opaque_global = external constant %opaque_type, align 4
+
+define void @test7() {
+entry:
+ %0 = alloca %real_type, align 4
+ %1 = bitcast %real_type* %0 to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* bitcast (%opaque_type* @opaque_global to i8*), i32 8, i32 1, i1 false)
+ ret void
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind