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