1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2
3 target triple = "arm-apple-darwin9"
4 @a = external global double ; <double*> [#uses=1]
5 @N = external global double ; <double*> [#uses=1]
7 declare double @llvm.exp.f64(double) nounwind readonly
9 define fastcc void @findratio(double* nocapture %res1, double* nocapture %res2) nounwind {
14 %0 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
15 %1 = add i32 %j.1, 1 ; <i32> [#uses=1]
18 bb52: ; preds = %bb53, %bb32, %bb.thread
19 %i.3494 = phi i32 [ 0, %bb.thread ], [ %3, %bb53 ], [ %i.3494, %bb32 ] ; <i32> [#uses=2]
20 %k.4 = phi double [ %0, %bb32 ], [ 0.000000e+00, %bb53 ], [ 0.000000e+00, %bb.thread ] ; <double> [#uses=2]
21 %j.1 = phi i32 [ %1, %bb32 ], [ 0, %bb53 ], [ 0, %bb.thread ] ; <i32> [#uses=2]
22 %2 = icmp sgt i32 %j.1, 99 ; <i1> [#uses=1]
23 br i1 %2, label %bb53, label %bb32
26 %3 = add i32 %i.3494, 1 ; <i32> [#uses=2]
27 %phitmp = icmp sgt i32 %3, 999999 ; <i1> [#uses=1]
28 br i1 %phitmp, label %bb55, label %bb52
31 %4 = load double* @a, align 4 ; <double> [#uses=10]
32 %5 = add double %4, 0.000000e+00 ; <double> [#uses=16]
33 %6 = fcmp ogt double %k.4, 0.000000e+00 ; <i1> [#uses=1]
34 %.pn404 = mul double %4, %4 ; <double> [#uses=4]
35 %.pn402 = mul double %5, %5 ; <double> [#uses=5]
36 %.pn165.in = load double* @N ; <double> [#uses=5]
37 %.pn198 = mul double 0.000000e+00, %5 ; <double> [#uses=1]
38 %.pn185 = sub double -0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
39 %.pn147 = sub double -0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
40 %.pn141 = fdiv double 0.000000e+00, %4 ; <double> [#uses=1]
41 %.pn142 = fdiv double 0.000000e+00, %5 ; <double> [#uses=1]
42 %.pn136 = fdiv double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
43 %.pn132 = fdiv double 0.000000e+00, %5 ; <double> [#uses=1]
44 %.pn123 = fdiv double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
45 %.pn124 = fdiv double 0.000000e+00, %.pn198 ; <double> [#uses=1]
46 %.pn120 = fdiv double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
47 %.pn117 = fdiv double 0.000000e+00, %4 ; <double> [#uses=1]
48 %.pn118 = fdiv double %.pn185, %5 ; <double> [#uses=1]
49 %.pn88 = fdiv double %.pn147, %5 ; <double> [#uses=1]
50 %.pn81 = sub double %.pn141, %.pn142 ; <double> [#uses=1]
51 %.pn77 = sub double 0.000000e+00, %.pn136 ; <double> [#uses=1]
52 %.pn75 = sub double 0.000000e+00, %.pn132 ; <double> [#uses=1]
53 %.pn69 = sub double %.pn123, %.pn124 ; <double> [#uses=1]
54 %.pn67 = sub double 0.000000e+00, %.pn120 ; <double> [#uses=1]
55 %.pn56 = sub double %.pn117, %.pn118 ; <double> [#uses=1]
56 %.pn42 = sub double 0.000000e+00, %.pn88 ; <double> [#uses=1]
57 %.pn60 = mul double %.pn81, 0.000000e+00 ; <double> [#uses=1]
58 %.pn57 = add double %.pn77, 0.000000e+00 ; <double> [#uses=1]
59 %.pn58 = mul double %.pn75, %.pn165.in ; <double> [#uses=1]
60 %.pn32 = add double %.pn69, 0.000000e+00 ; <double> [#uses=1]
61 %.pn33 = mul double %.pn67, %.pn165.in ; <double> [#uses=1]
62 %.pn17 = sub double 0.000000e+00, %.pn60 ; <double> [#uses=1]
63 %.pn9 = add double %.pn57, %.pn58 ; <double> [#uses=1]
64 %.pn30 = mul double 0.000000e+00, %.pn56 ; <double> [#uses=1]
65 %.pn24 = mul double 0.000000e+00, %.pn42 ; <double> [#uses=1]
66 %.pn1 = add double %.pn32, %.pn33 ; <double> [#uses=1]
67 %.pn28 = sub double %.pn30, 0.000000e+00 ; <double> [#uses=1]
68 %.pn26 = add double %.pn28, 0.000000e+00 ; <double> [#uses=1]
69 %.pn22 = sub double %.pn26, 0.000000e+00 ; <double> [#uses=1]
70 %.pn20 = sub double %.pn24, 0.000000e+00 ; <double> [#uses=1]
71 %.pn18 = add double %.pn22, 0.000000e+00 ; <double> [#uses=1]
72 %.pn16 = add double %.pn20, 0.000000e+00 ; <double> [#uses=1]
73 %.pn14 = sub double %.pn18, 0.000000e+00 ; <double> [#uses=1]
74 %.pn12 = sub double %.pn16, %.pn17 ; <double> [#uses=1]
75 %.pn10 = add double %.pn14, 0.000000e+00 ; <double> [#uses=1]
76 %.pn8 = add double %.pn12, 0.000000e+00 ; <double> [#uses=1]
77 %.pn6 = sub double %.pn10, 0.000000e+00 ; <double> [#uses=1]
78 %.pn4 = sub double %.pn8, %.pn9 ; <double> [#uses=1]
79 %.pn2 = add double %.pn6, 0.000000e+00 ; <double> [#uses=1]
80 %.pn = add double %.pn4, 0.000000e+00 ; <double> [#uses=1]
81 %N1.0 = sub double %.pn2, 0.000000e+00 ; <double> [#uses=2]
82 %D1.0 = sub double %.pn, %.pn1 ; <double> [#uses=2]
83 br i1 %6, label %bb62, label %bb64
86 %7 = mul double 0.000000e+00, %4 ; <double> [#uses=1]
87 %8 = sub double -0.000000e+00, %7 ; <double> [#uses=3]
88 %9 = mul double 0.000000e+00, %5 ; <double> [#uses=1]
89 %10 = sub double -0.000000e+00, %9 ; <double> [#uses=3]
90 %11 = mul double %.pn404, %4 ; <double> [#uses=5]
91 %12 = mul double %.pn402, %5 ; <double> [#uses=5]
92 %13 = mul double 0.000000e+00, -2.000000e+00 ; <double> [#uses=1]
93 %14 = fdiv double 0.000000e+00, %.pn402 ; <double> [#uses=1]
94 %15 = sub double 0.000000e+00, %14 ; <double> [#uses=1]
95 %16 = mul double 0.000000e+00, %15 ; <double> [#uses=1]
96 %17 = add double %13, %16 ; <double> [#uses=1]
97 %18 = mul double %.pn165.in, -2.000000e+00 ; <double> [#uses=5]
98 %19 = mul double %18, 0.000000e+00 ; <double> [#uses=1]
99 %20 = add double %17, %19 ; <double> [#uses=1]
100 %21 = mul double 0.000000e+00, %20 ; <double> [#uses=1]
101 %22 = add double 0.000000e+00, %21 ; <double> [#uses=1]
102 %23 = fdiv double 0.000000e+00, %12 ; <double> [#uses=1]
103 %24 = sub double 0.000000e+00, %23 ; <double> [#uses=0]
104 %25 = mul double %18, 0.000000e+00 ; <double> [#uses=1]
105 %26 = add double 0.000000e+00, %25 ; <double> [#uses=1]
106 %27 = mul double 0.000000e+00, %26 ; <double> [#uses=1]
107 %28 = sub double %22, %27 ; <double> [#uses=1]
108 %29 = mul double %11, %4 ; <double> [#uses=1]
109 %30 = mul double %12, %5 ; <double> [#uses=3]
110 %31 = mul double %.pn165.in, -4.000000e+00 ; <double> [#uses=1]
111 %32 = mul double %.pn165.in, 0x3FF5555555555555 ; <double> [#uses=1]
112 %33 = mul double %32, 0.000000e+00 ; <double> [#uses=2]
113 %34 = add double %28, 0.000000e+00 ; <double> [#uses=1]
114 %35 = sub double -0.000000e+00, 0.000000e+00 ; <double> [#uses=1]
115 %36 = fdiv double %35, %11 ; <double> [#uses=1]
116 %37 = fdiv double 0.000000e+00, %12 ; <double> [#uses=1]
117 %38 = sub double %36, %37 ; <double> [#uses=1]
118 %39 = mul double 0.000000e+00, %38 ; <double> [#uses=1]
119 %40 = add double 0.000000e+00, %39 ; <double> [#uses=1]
120 %41 = add double %40, 0.000000e+00 ; <double> [#uses=1]
121 %42 = add double %41, 0.000000e+00 ; <double> [#uses=1]
122 %43 = mul double %42, 0.000000e+00 ; <double> [#uses=1]
123 %44 = sub double %34, %43 ; <double> [#uses=1]
124 %45 = tail call double @llvm.exp.f64(double %8) nounwind ; <double> [#uses=1]
125 %46 = sub double -0.000000e+00, %45 ; <double> [#uses=2]
126 %47 = fdiv double %46, 0.000000e+00 ; <double> [#uses=1]
127 %48 = mul double %30, %5 ; <double> [#uses=1]
128 %49 = fdiv double 0.000000e+00, %48 ; <double> [#uses=1]
129 %50 = sub double %47, %49 ; <double> [#uses=1]
130 %51 = mul double %50, -4.000000e+00 ; <double> [#uses=1]
131 %52 = add double %51, 0.000000e+00 ; <double> [#uses=1]
132 %53 = fdiv double %46, %11 ; <double> [#uses=1]
133 %54 = sub double %53, 0.000000e+00 ; <double> [#uses=1]
134 %55 = mul double %31, %54 ; <double> [#uses=1]
135 %56 = add double %52, %55 ; <double> [#uses=1]
136 %57 = add double %56, 0.000000e+00 ; <double> [#uses=1]
137 %58 = add double %44, %57 ; <double> [#uses=1]
138 %59 = sub double %58, 0.000000e+00 ; <double> [#uses=1]
139 %60 = tail call double @llvm.exp.f64(double 0.000000e+00) nounwind ; <double> [#uses=1]
140 %61 = sub double -0.000000e+00, %60 ; <double> [#uses=1]
141 %62 = fdiv double 0.000000e+00, -6.000000e+00 ; <double> [#uses=1]
142 %63 = fdiv double %61, %5 ; <double> [#uses=1]
143 %64 = sub double 0.000000e+00, %63 ; <double> [#uses=1]
144 %65 = mul double %62, %64 ; <double> [#uses=1]
145 %66 = sub double 0.000000e+00, %65 ; <double> [#uses=1]
146 %67 = sub double -0.000000e+00, 0.000000e+00 ; <double> [#uses=2]
147 %68 = tail call double @llvm.exp.f64(double %10) nounwind ; <double> [#uses=1]
148 %69 = sub double -0.000000e+00, %68 ; <double> [#uses=2]
149 %70 = fdiv double %67, %.pn404 ; <double> [#uses=1]
150 %71 = fdiv double %69, %.pn402 ; <double> [#uses=1]
151 %72 = sub double %70, %71 ; <double> [#uses=1]
152 %73 = mul double %72, -5.000000e-01 ; <double> [#uses=1]
153 %74 = fdiv double %67, %4 ; <double> [#uses=1]
154 %75 = fdiv double %69, %5 ; <double> [#uses=1]
155 %76 = sub double %74, %75 ; <double> [#uses=1]
156 %77 = mul double %76, 0.000000e+00 ; <double> [#uses=1]
157 %78 = add double %73, %77 ; <double> [#uses=1]
158 %79 = mul double 0.000000e+00, %78 ; <double> [#uses=1]
159 %80 = add double %66, %79 ; <double> [#uses=1]
160 %81 = fdiv double 0.000000e+00, %.pn404 ; <double> [#uses=1]
161 %82 = fdiv double 0.000000e+00, %.pn402 ; <double> [#uses=1]
162 %83 = sub double %81, %82 ; <double> [#uses=1]
163 %84 = mul double %83, -5.000000e-01 ; <double> [#uses=1]
164 %85 = fdiv double 0.000000e+00, %4 ; <double> [#uses=1]
165 %86 = fdiv double 0.000000e+00, %5 ; <double> [#uses=1]
166 %87 = sub double %85, %86 ; <double> [#uses=1]
167 %88 = mul double %87, 0.000000e+00 ; <double> [#uses=1]
168 %89 = add double %84, %88 ; <double> [#uses=1]
169 %90 = mul double 0.000000e+00, %89 ; <double> [#uses=1]
170 %91 = sub double %80, %90 ; <double> [#uses=1]
171 %92 = tail call double @llvm.exp.f64(double %8) nounwind ; <double> [#uses=1]
172 %93 = sub double -0.000000e+00, %92 ; <double> [#uses=1]
173 %94 = tail call double @llvm.exp.f64(double %10) nounwind ; <double> [#uses=1]
174 %95 = sub double -0.000000e+00, %94 ; <double> [#uses=3]
175 %96 = fdiv double %95, %.pn402 ; <double> [#uses=1]
176 %97 = sub double 0.000000e+00, %96 ; <double> [#uses=1]
177 %98 = mul double 0.000000e+00, %97 ; <double> [#uses=1]
178 %99 = fdiv double %93, %11 ; <double> [#uses=1]
179 %100 = fdiv double %95, %12 ; <double> [#uses=1]
180 %101 = sub double %99, %100 ; <double> [#uses=1]
181 %102 = sub double %98, %101 ; <double> [#uses=1]
182 %103 = fdiv double %95, %5 ; <double> [#uses=1]
183 %104 = sub double 0.000000e+00, %103 ; <double> [#uses=1]
184 %105 = mul double %18, %104 ; <double> [#uses=1]
185 %106 = add double %102, %105 ; <double> [#uses=1]
186 %107 = mul double %106, %k.4 ; <double> [#uses=1]
187 %108 = add double %91, %107 ; <double> [#uses=1]
188 %109 = sub double %108, 0.000000e+00 ; <double> [#uses=1]
189 %110 = tail call double @llvm.exp.f64(double %8) nounwind ; <double> [#uses=1]
190 %111 = sub double -0.000000e+00, %110 ; <double> [#uses=2]
191 %112 = tail call double @llvm.exp.f64(double %10) nounwind ; <double> [#uses=1]
192 %113 = sub double -0.000000e+00, %112 ; <double> [#uses=2]
193 %114 = fdiv double %111, %11 ; <double> [#uses=1]
194 %115 = fdiv double %113, %12 ; <double> [#uses=1]
195 %116 = sub double %114, %115 ; <double> [#uses=1]
196 %117 = mul double 0.000000e+00, %116 ; <double> [#uses=1]
197 %118 = fdiv double %111, %29 ; <double> [#uses=1]
198 %119 = fdiv double %113, %30 ; <double> [#uses=1]
199 %120 = sub double %118, %119 ; <double> [#uses=1]
200 %121 = sub double %117, %120 ; <double> [#uses=1]
201 %122 = mul double %18, 0.000000e+00 ; <double> [#uses=1]
202 %123 = add double %121, %122 ; <double> [#uses=1]
203 %124 = mul double %33, 0.000000e+00 ; <double> [#uses=1]
204 %125 = add double %123, %124 ; <double> [#uses=1]
205 %126 = add double %109, %125 ; <double> [#uses=1]
206 %127 = tail call double @llvm.exp.f64(double 0.000000e+00) nounwind ; <double> [#uses=1]
207 %128 = sub double -0.000000e+00, %127 ; <double> [#uses=2]
208 %129 = fdiv double %128, %30 ; <double> [#uses=1]
209 %130 = sub double 0.000000e+00, %129 ; <double> [#uses=1]
210 %131 = sub double 0.000000e+00, %130 ; <double> [#uses=1]
211 %132 = fdiv double 0.000000e+00, %.pn404 ; <double> [#uses=1]
212 %133 = sub double %132, 0.000000e+00 ; <double> [#uses=1]
213 %134 = mul double %18, %133 ; <double> [#uses=1]
214 %135 = add double %131, %134 ; <double> [#uses=1]
215 %136 = fdiv double %128, %5 ; <double> [#uses=1]
216 %137 = sub double 0.000000e+00, %136 ; <double> [#uses=1]
217 %138 = mul double %33, %137 ; <double> [#uses=1]
218 %139 = add double %135, %138 ; <double> [#uses=1]
219 %140 = sub double %126, %139 ; <double> [#uses=1]
220 %141 = add double %N1.0, %59 ; <double> [#uses=1]
221 %142 = add double %D1.0, %140 ; <double> [#uses=1]
224 bb64: ; preds = %bb62, %bb55
225 %N1.0.pn = phi double [ %141, %bb62 ], [ %N1.0, %bb55 ] ; <double> [#uses=1]
226 %D1.0.pn = phi double [ %142, %bb62 ], [ %D1.0, %bb55 ] ; <double> [#uses=1]
227 %x.1 = fdiv double %N1.0.pn, %D1.0.pn ; <double> [#uses=0]