aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-12-01 11:53:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-12-01 11:53:32 +0000
commit5bded7525b4eb1ae4ce3f7d05159de95d0f595f2 (patch)
tree078f4a4ae123deda687c3a64795a7cfef2c59938 /test
parentefcdb2944bb81519c839feef3a83feed35552393 (diff)
downloadexternal_llvm-5bded7525b4eb1ae4ce3f7d05159de95d0f595f2.zip
external_llvm-5bded7525b4eb1ae4ce3f7d05159de95d0f595f2.tar.gz
external_llvm-5bded7525b4eb1ae4ce3f7d05159de95d0f595f2.tar.bz2
SROA: Avoid struct and array types early to avoid creating an overly large integer type.
Fixes PR14465. Differential Revision: http://llvm-reviews.chandlerc.com/D148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/SROA/basictest.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/SROA/basictest.ll b/test/Transforms/SROA/basictest.ll
index b363eef..a291c39 100644
--- a/test/Transforms/SROA/basictest.ll
+++ b/test/Transforms/SROA/basictest.ll
@@ -1134,3 +1134,16 @@ entry:
ret void
; CHECK: ret
}
+
+define void @PR14465() {
+; Ensure that we don't crash when analyzing a alloca larger than the maximum
+; integer type width (MAX_INT_BITS) supported by llvm (1048576*32 > (1<<23)-1).
+; CHECK: @PR14465
+
+ %stack = alloca [1048576 x i32], align 16
+; CHECK: alloca [1048576 x i32]
+ %cast = bitcast [1048576 x i32]* %stack to i8*
+ call void @llvm.memset.p0i8.i64(i8* %cast, i8 -2, i64 4194304, i32 16, i1 false)
+ ret void
+; CHECK: ret
+}