1 ; RUN: opt < %s -globalopt -S | FileCheck %s
3 ; Don't get fooled by the inbounds keyword; it doesn't change
4 ; the computed address.
6 ; CHECK: @H = local_unnamed_addr global i32 2
7 ; CHECK: @I = local_unnamed_addr global i32 2
9 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [ { i32, void ()*, i8* } { i32 65535, void ()* @CTOR, i8* null } ]
10 @addr = external global i32
11 @G = internal global [6 x [5 x i32]] zeroinitializer
15 define internal void @CTOR() {
16 store i32 1, i32* getelementptr ([6 x [5 x i32]], [6 x [5 x i32]]* @G, i64 0, i64 0, i64 0)
17 store i32 2, i32* getelementptr inbounds ([6 x [5 x i32]], [6 x [5 x i32]]* @G, i64 0, i64 0, i64 0)
18 %t = load i32, i32* getelementptr ([6 x [5 x i32]], [6 x [5 x i32]]* @G, i64 0, i64 0, i64 0)
20 %s = load i32, i32* getelementptr inbounds ([6 x [5 x i32]], [6 x [5 x i32]]* @G, i64 0, i64 0, i64 0)