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