1 ; RUN: opt -globalopt -S < %s | FileCheck %s
2 ; CHECK: @Y = {{.*}} section ".foo"
4 %struct.xyz = type { double, i32 }
6 @Y = internal global %struct.xyz* null ,section ".foo" ; <%struct.xyz**> [#uses=2]
7 @numf2s = external global i32 ; <i32*> [#uses=1]
9 define void @init_net() {
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
19 define void @load_train() {
21 %0 = load %struct.xyz*, %struct.xyz** @Y, align 8 ; <%struct.xyz*> [#uses=0]
25 declare noalias i8* @malloc(i32)