1 ; RUN: opt -passes=globalopt -S < %s | FileCheck %s
3 %sometype = type { i8* }
5 @map = internal unnamed_addr global %sometype* null, align 8
10 ; CHECK-NEXT: store i1 true, i1* @map.init, align 1
11 ; CHECK-NEXT: ret void
14 %call = tail call noalias nonnull dereferenceable(48) i8* @_Znwm(i64 48)
15 store i8* %call, i8** bitcast (%sometype** @map to i8**), align 8
19 define void @Usage() {
20 ; CHECK-LABEL: @Usage(
22 ; CHECK-NEXT: [[MAP_INIT_VAL:%.*]] = load i1, i1* @map.init, align 1
23 ; CHECK-NEXT: [[NOTINIT:%.*]] = xor i1 [[MAP_INIT_VAL]], true
24 ; CHECK-NEXT: unreachable
27 %0 = load i8*, i8** bitcast (%sometype** @map to i8**), align 8
28 %.not = icmp eq i8* %0, null
32 declare i8* @_Znwm(i64)