1 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output &&
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep CTOR
4 %llvm.global_ctors = appending global [10 x { int, void ()* }] [
5 { int, void ()* } { int 65535, void ()* %CTOR1 },
6 { int, void ()* } { int 65535, void ()* %CTOR1 },
7 { int, void ()* } { int 65535, void ()* %CTOR2 },
8 { int, void ()* } { int 65535, void ()* %CTOR3 },
9 { int, void ()* } { int 65535, void ()* %CTOR4 },
10 { int, void ()* } { int 65535, void ()* %CTOR5 },
11 { int, void ()* } { int 65535, void ()* %CTOR6 },
12 { int, void ()* } { int 65535, void ()* %CTOR7 },
13 { int, void ()* } { int 65535, void ()* %CTOR8 },
14 { int, void ()* } { int 2147483647, void ()* null }
20 %X = global {int, [2 x int]} { int 0, [2 x int] [ int 17, int 21] }
23 %D = global double 0.0
25 %CTORGV = internal global bool false ;; Should become constant after eval
29 internal void %CTOR1() { ;; noop ctor, remove.
33 internal void %CTOR2() { ;; evaluate the store
36 store bool true, bool* %CTORGV
40 internal void %CTOR3() {
41 %X = or bool true, false
44 br bool %X, label %S, label %T
46 store int 24, int* %G2
52 internal void %CTOR4() {
55 store int %Y, int* %G3
59 internal void %CTOR5() {
60 %X.2p = getelementptr {int,[2 x int]}* %X, int 0, uint 1, int 0
61 %X.2 = load int* %X.2p
62 %X.1p = getelementptr {int,[2 x int]}* %X, int 0, uint 0
63 store int %X.2, int* %X.1p
64 store int 42, int* %X.2p
68 internal void %CTOR6() {
74 store int %Av1, int* %Y
78 internal void %CTOR7() {
79 call void %setto(int* %Z, int 0)
83 void %setto(int* %P, int %V) {
88 declare double %cos(double)
90 internal void %CTOR8() {
91 %X = call double %cos(double 1.0)
92 store double %X, double* %D
96 %V = load bool* %CTORGV ;; constant true