1 ; RUN: opt < %s -globalopt -S | FileCheck %s
3 @a = internal global i64* null, align 8
7 define void @qux_no_null_opt() nounwind #0 {
8 ; CHECK-LABEL: @qux_no_null_opt(
9 ; CHECK: getelementptr i64*, i64** @a, i32 1
10 ; CHECK: store i64* inttoptr (i64 1 to i64*), i64** @a
11 %b = bitcast i64** @a to i8*
12 %g = getelementptr i64*, i64** @a, i32 1
13 %cmp = icmp ne i8* null, %b
14 %cmp2 = icmp eq i8* null, %b
15 %cmp3 = icmp eq i64** null, %g
16 store i64* inttoptr (i64 1 to i64*), i64** @a, align 8
17 %l = load i64*, i64** @a, align 8
22 %X = load i64*, i64** @a, align 8
28 attributes #0 = { "null-pointer-is-valid"="true" }