Merging r258616:
[oota-llvm.git] / test / Transforms / GlobalOpt / 2008-01-13-OutOfRangeSROA.ll
1 ; RUN: opt < %s -globalopt -S | grep "16 x .31 x double.. zeroinitializer"
2
3 ; The 'X' indices could be larger than 31.  Do not SROA the outer indices of this array.
4 @mm = internal global [16 x [31 x double]] zeroinitializer, align 32
5
6 define void @test(i32 %X) {
7         %P = getelementptr [16 x [31 x double]], [16 x [31 x double]]* @mm, i32 0, i32 0, i32 %X
8         store double 1.0, double* %P
9         ret void
10 }
11
12 define double @get(i32 %X) {
13         %P = getelementptr [16 x [31 x double]], [16 x [31 x double]]* @mm, i32 0, i32 0, i32 %X
14         %V = load double, double* %P
15         ret double %V
16 }