1 ; RUN: llvm-as < %s | opt -inline -disable-output
2 %struct.Demand = type { double, double }
3 %struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] }
4 %struct.leaf = type { %struct.Demand, double, double }
5 @P = external global double ; <double*> [#uses=1]
7 define %struct.leaf* @build_leaf() nounwind {
12 define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
14 %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
15 %a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0]
16 br i1 false, label %bb46, label %bb
18 %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
19 %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
20 %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
21 %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
22 ret double %mrv.ld, double %mrv.ld2
23 bb46: ; preds = %entry
26 call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1]
27 %gr = getresult %struct.Demand %0, 1 ; <double> [#uses=0]
29 bb72: ; preds = %bb49, %bb46
30 br i1 false, label %bb49, label %bb77
32 %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
33 %mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
34 %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
35 %mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
36 ret double %mrv.ld4, double %mrv.ld6
39 define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
41 %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=2]
42 %tmp10 = load double* @P, align 8 ; <double> [#uses=1]
43 %tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; <i1> [#uses=1]
44 br i1 %tmp11, label %bb, label %bb13
47 bb13: ; preds = %bb, %entry
48 %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
49 %mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
50 %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
51 %mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
52 ret double %mrv.ld, double %mrv.ld2