1 ; RUN: opt < %s -globalopt -S | FileCheck %s
3 @G = internal global i32 17 ; <i32*> [#uses=3]
7 %V = load i32, i32* @G ; <i32> [#uses=1]
11 ; CHECK-NEXT: ret void
15 %X = load i32, i32* @G ; <i32> [#uses=1]
18 ; CHECK-NEXT: ret i32 17
21 @a = internal global i64* null, align 8
25 define void @qux() nounwind {
26 %b = bitcast i64** @a to i8*
27 %g = getelementptr i64*, i64** @a, i32 1
28 %cmp = icmp ne i8* null, %b
29 %cmp2 = icmp eq i8* null, %b
30 %cmp3 = icmp eq i64** null, %g
31 store i64* inttoptr (i64 1 to i64*), i64** @a, align 8
32 %l = load i64*, i64** @a, align 8