1 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
3 %struct.A = type { i32, [2 x [2 x i32]], i8, [3 x [3 x [3 x i32]]] }
4 %struct.B = type { i32, [2 x [2 x [2 x %struct.A]]] }
6 @arr = common global [2 x [2 x [2 x [2 x [2 x i32]]]]] zeroinitializer, align 4
7 @A = common global [3 x [3 x %struct.A]] zeroinitializer, align 4
8 @B = common global [2 x [2 x [2 x %struct.B]]] zeroinitializer, align 4
10 define i32* @t1() nounwind {
13 %addr = alloca i32*, align 4
14 store i32* getelementptr inbounds ([2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* @arr, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1), i32** %addr, align 4
15 ; ELF64: addi {{[0-9]+}}, {{[0-9]+}}, 124
16 %0 = load i32*, i32** %addr, align 4
20 define i32* @t2() nounwind {
23 %addr = alloca i32*, align 4
24 store i32* getelementptr inbounds ([3 x [3 x %struct.A]], [3 x [3 x %struct.A]]* @A, i32 0, i32 2, i32 2, i32 3, i32 1, i32 2, i32 2), i32** %addr, align 4
25 ; ELF64: addi {{[0-9]+}}, {{[0-9]+}}, 1148
26 %0 = load i32*, i32** %addr, align 4
30 define i32* @t3() nounwind {
33 %addr = alloca i32*, align 4
34 store i32* getelementptr inbounds ([3 x [3 x %struct.A]], [3 x [3 x %struct.A]]* @A, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1), i32** %addr, align 4
35 ; ELF64: addi {{[0-9]+}}, {{[0-9]+}}, 140
36 %0 = load i32*, i32** %addr, align 4
40 define i32* @t4() nounwind {
43 %addr = alloca i32*, align 4
44 store i32* getelementptr inbounds ([2 x [2 x [2 x %struct.B]]], [2 x [2 x [2 x %struct.B]]]* @B, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 3, i32 1, i32 2, i32 1), i32** %addr, align 4
45 ; ELF64: addi {{[0-9]+}}, {{[0-9]+}}, 1284
46 %0 = load i32*, i32** %addr, align 4