1; RUN: opt -passes=globalopt -S < %s | FileCheck %s 2; CHECK: @Y = {{.*}} section ".foo" 3 4%struct.xyz = type { double, i32 } 5 6@Y = internal global %struct.xyz* null ,section ".foo" ; <%struct.xyz**> [#uses=2] 7@numf2s = external global i32 ; <i32*> [#uses=1] 8 9define void @init_net() { 10entry: 11 %0 = load i32, i32* @numf2s, align 4 ; <i32> [#uses=1] 12 %mallocsize2 = shl i32 %0, 4 ; <i32> [#uses=1] 13 %malloccall3 = tail call i8* @malloc(i32 %mallocsize2) ; <i8*> [#uses=1] 14 %1 = bitcast i8* %malloccall3 to %struct.xyz* ; <%struct.xyz*> [#uses=1] 15 store %struct.xyz* %1, %struct.xyz** @Y, align 8 16 ret void 17} 18 19define void @load_train() { 20entry: 21 %0 = load %struct.xyz*, %struct.xyz** @Y, align 8 ; <%struct.xyz*> [#uses=0] 22 ret void 23} 24 25declare noalias i8* @malloc(i32) 26