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