1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
2 ; RUN: opt -S -globalopt < %s | FileCheck %s
4 ; Make sure that the load from uniform value @g1 succeeds during evaluation.
6 @g1 = global [2 x i64*] zeroinitializer
7 @g2 = global i64* inttoptr(i64 1 to i64*)
9 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
12 ; CHECK: @[[G1:[a-zA-Z0-9_$"\\.-]+]] = local_unnamed_addr global [2 x i64*] zeroinitializer
13 ; CHECK: @[[G2:[a-zA-Z0-9_$"\\.-]+]] = local_unnamed_addr global i64* null
14 ; CHECK: @[[LLVM_GLOBAL_CTORS:[a-zA-Z0-9_$"\\.-]+]] = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
16 define internal void @ctor() {
17 %v = load i64*, i64** getelementptr ([2 x i64*], [2 x i64*]* @g1, i64 0, i64 1)
18 store i64* %v, i64** @g2