1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 ; This test makes sure that we do not assume globals in address spaces other
4 ; than 0 are able to be null.
6 @as0 = external global i32
7 @as1 = external addrspace(1) global i32
9 declare void @addrspace0(i32*)
10 declare void @addrspace1(i32 addrspace(1)*)
12 ; CHECK: call void @addrspace0(i32* nonnull @as0)
13 ; CHECK: call void @addrspace1(i32 addrspace(1)* @as1)
16 call void @addrspace0(i32* @as0)
17 call void @addrspace1(i32 addrspace(1)* @as1)