1 ; RUN: opt < %s -passes=globalopt -S | FileCheck %s
3 @a = internal global ptr null, align 8
7 define void @qux_no_null_opt() nounwind #0 {
8 ; CHECK-LABEL: @qux_no_null_opt(
9 ; CHECK: getelementptr ptr, ptr @a, i32 1
10 ; CHECK: store ptr inttoptr (i64 1 to ptr), ptr @a
11 %g = getelementptr ptr, ptr @a, i32 1
12 %cmp = icmp ne ptr null, @a
13 %cmp2 = icmp eq ptr null, @a
14 %cmp3 = icmp eq ptr null, %g
15 store ptr inttoptr (i64 1 to ptr), ptr @a, align 8
16 %l = load ptr, ptr @a, align 8
21 %X = load ptr, ptr @a, align 8
27 attributes #0 = { null_pointer_is_valid }