llvm.org GIT mirror llvm / 7f284a9
Revert r246158 since it breaks LLVM.Transforms/ConstProp.calls.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246166 91177308-0d34-0410-b5e6-96231b3b80d8 Erik Schnetter 4 years ago
2 changed file(s) with 80 addition(s) and 693 deletion(s). Raw diff Collapse all Expand all
12811281 // return true for a name like "cos\0blah" which strcmp would return equal to
12821282 // "cos", but has length 8.
12831283 switch (Name[0]) {
1284 default:
1285 return false;
1284 default: return false;
12861285 case 'a':
1287 return Name == "acos" || Name == "asin" || Name == "atan" ||
1288 Name == "atan2" || Name == "acosf" || Name == "asinf" ||
1289 Name == "atanf" || Name == "atan2f";
1286 return Name == "acos" || Name == "asin" || Name == "atan" || Name =="atan2";
12901287 case 'c':
1291 return Name == "ceil" || Name == "cos" || Name == "cosh" ||
1292 Name == "ceilf" || Name == "cosf" || Name == "coshf";
1288 return Name == "cos" || Name == "ceil" || Name == "cosf" || Name == "cosh";
12931289 case 'e':
1294 return Name == "exp" || Name == "exp2" || Name == "expf" || Name == "exp2f";
1290 return Name == "exp" || Name == "exp2";
12951291 case 'f':
1296 return Name == "fabs" || Name == "floor" || Name == "fmod" ||
1297 Name == "fabsf" || Name == "floorf" || Name == "fmodf";
1292 return Name == "fabs" || Name == "fmod" || Name == "floor";
12981293 case 'l':
1299 return Name == "log" || Name == "log10" || Name == "logf" ||
1300 Name == "log10f";
1294 return Name == "log" || Name == "log10";
13011295 case 'p':
1302 return Name == "pow" || Name == "powf";
1296 return Name == "pow";
13031297 case 's':
13041298 return Name == "sin" || Name == "sinh" || Name == "sqrt" ||
1305 Name == "sinf" || Name == "sinhf" || Name == "sqrtf";
1299 Name == "sinf" || Name == "sqrtf";
13061300 case 't':
1307 return Name == "tan" || Name == "tanh" || Name == "tanf" || Name == "tanhf";
1301 return Name == "tan" || Name == "tanh";
13081302 }
13091303 }
13101304
15001494
15011495 switch (Name[0]) {
15021496 case 'a':
1503 if ((Name == "acos" && TLI->has(LibFunc::acos)) ||
1504 (Name == "acosf" && TLI->has(LibFunc::acosf)))
1497 if (Name == "acos" && TLI->has(LibFunc::acos))
15051498 return ConstantFoldFP(acos, V, Ty);
1506 else if ((Name == "asin" && TLI->has(LibFunc::asin)) ||
1507 (Name == "asinf" && TLI->has(LibFunc::asinf)))
1499 else if (Name == "asin" && TLI->has(LibFunc::asin))
15081500 return ConstantFoldFP(asin, V, Ty);
1509 else if ((Name == "atan" && TLI->has(LibFunc::atan)) ||
1510 (Name == "atanf" && TLI->has(LibFunc::atanf)))
1501 else if (Name == "atan" && TLI->has(LibFunc::atan))
15111502 return ConstantFoldFP(atan, V, Ty);
15121503 break;
15131504 case 'c':
1514 if ((Name == "ceil" && TLI->has(LibFunc::ceil)) ||
1515 (Name == "ceilf" && TLI->has(LibFunc::ceilf)))
1505 if (Name == "ceil" && TLI->has(LibFunc::ceil))
15161506 return ConstantFoldFP(ceil, V, Ty);
1517 else if ((Name == "cos" && TLI->has(LibFunc::cos)) ||
1518 (Name == "cosf" && TLI->has(LibFunc::cosf)))
1507 else if (Name == "cos" && TLI->has(LibFunc::cos))
15191508 return ConstantFoldFP(cos, V, Ty);
1520 else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) ||
1521 (Name == "coshf" && TLI->has(LibFunc::coshf)))
1509 else if (Name == "cosh" && TLI->has(LibFunc::cosh))
15221510 return ConstantFoldFP(cosh, V, Ty);
1511 else if (Name == "cosf" && TLI->has(LibFunc::cosf))
1512 return ConstantFoldFP(cos, V, Ty);
15231513 break;
15241514 case 'e':
1525 if ((Name == "exp" && TLI->has(LibFunc::exp)) ||
1526 (Name == "expf" && TLI->has(LibFunc::expf)))
1515 if (Name == "exp" && TLI->has(LibFunc::exp))
15271516 return ConstantFoldFP(exp, V, Ty);
1528 if ((Name == "exp2" && TLI->has(LibFunc::exp2)) ||
1529 (Name == "exp2f" && TLI->has(LibFunc::exp2f)))
1517
1518 if (Name == "exp2" && TLI->has(LibFunc::exp2)) {
15301519 // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a
15311520 // C99 library.
15321521 return ConstantFoldBinaryFP(pow, 2.0, V, Ty);
1522 }
15331523 break;
15341524 case 'f':
1535 if ((Name == "fabs" && TLI->has(LibFunc::fabs)) ||
1536 (Name == "fabsf" && TLI->has(LibFunc::fabsf)))
1525 if (Name == "fabs" && TLI->has(LibFunc::fabs))
15371526 return ConstantFoldFP(fabs, V, Ty);
1538 else if ((Name == "floor" && TLI->has(LibFunc::floor)) ||
1539 (Name == "floorf" && TLI->has(LibFunc::floorf)))
1527 else if (Name == "floor" && TLI->has(LibFunc::floor))
15401528 return ConstantFoldFP(floor, V, Ty);
15411529 break;
15421530 case 'l':
1543 if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) ||
1544 (Name == "logf" && V > 0 && TLI->has(LibFunc::logf)))
1531 if (Name == "log" && V > 0 && TLI->has(LibFunc::log))
15451532 return ConstantFoldFP(log, V, Ty);
1546 else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) ||
1547 (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f)))
1533 else if (Name == "log10" && V > 0 && TLI->has(LibFunc::log10))
15481534 return ConstantFoldFP(log10, V, Ty);
15491535 else if (IntrinsicID == Intrinsic::sqrt &&
15501536 (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) {
15611547 }
15621548 break;
15631549 case 's':
1564 if ((Name == "sin" && TLI->has(LibFunc::sin)) ||
1565 (Name == "sinf" && TLI->has(LibFunc::sinf)))
1550 if (Name == "sin" && TLI->has(LibFunc::sin))
15661551 return ConstantFoldFP(sin, V, Ty);
1567 else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) ||
1568 (Name == "sinhf" && TLI->has(LibFunc::sinhf)))
1552 else if (Name == "sinh" && TLI->has(LibFunc::sinh))
15691553 return ConstantFoldFP(sinh, V, Ty);
1570 else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) ||
1571 (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf)))
1554 else if (Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt))
15721555 return ConstantFoldFP(sqrt, V, Ty);
1556 else if (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))
1557 return ConstantFoldFP(sqrt, V, Ty);
1558 else if (Name == "sinf" && TLI->has(LibFunc::sinf))
1559 return ConstantFoldFP(sin, V, Ty);
15731560 break;
15741561 case 't':
1575 if ((Name == "tan" && TLI->has(LibFunc::tan)) ||
1576 (Name == "tanf" && TLI->has(LibFunc::tanf)))
1562 if (Name == "tan" && TLI->has(LibFunc::tan))
15771563 return ConstantFoldFP(tan, V, Ty);
1578 else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) ||
1579 (Name == "tanhf" && TLI->has(LibFunc::tanhf)))
1564 else if (Name == "tanh" && TLI->has(LibFunc::tanh))
15801565 return ConstantFoldFP(tanh, V, Ty);
15811566 break;
15821567 default:
16791664
16801665 if (!TLI)
16811666 return nullptr;
1682 if ((Name == "pow" && TLI->has(LibFunc::pow)) ||
1683 (Name == "powf" && TLI->has(LibFunc::powf)))
1667 if (Name == "pow" && TLI->has(LibFunc::pow))
16841668 return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty);
1685 if ((Name == "fmod" && TLI->has(LibFunc::fmod)) ||
1686 (Name == "fmodf" && TLI->has(LibFunc::fmodf)))
1669 if (Name == "fmod" && TLI->has(LibFunc::fmod))
16871670 return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty);
1688 if ((Name == "atan2" && TLI->has(LibFunc::atan2)) ||
1689 (Name == "atan2f" && TLI->has(LibFunc::atan2f)))
1671 if (Name == "atan2" && TLI->has(LibFunc::atan2))
16901672 return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty);
16911673 } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) {
16921674 if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy())
0 ; RUN: opt < %s -constprop -S | FileCheck %s
11 ; RUN: opt < %s -constprop -disable-simplify-libcalls -S | FileCheck %s --check-prefix=FNOBUILTIN
22
3 declare double @acos(double)
4 declare double @asin(double)
5 declare double @atan(double)
6 declare double @atan2(double, double)
7 declare double @ceil(double)
83 declare double @cos(double)
9 declare double @cosh(double)
10 declare double @exp(double)
4
5 declare double @sin(double)
6
7 declare double @tan(double)
8
9 declare double @sqrt(double)
1110 declare double @exp2(double)
12 declare double @fabs(double)
13 declare double @floor(double)
14 declare double @fmod(double, double)
15 declare double @log(double)
16 declare double @log10(double)
17 declare double @pow(double, double)
18 declare double @sin(double)
19 declare double @sinh(double)
20 declare double @sqrt(double)
21 declare double @tan(double)
22 declare double @tanh(double)
23
24 declare float @acosf(float)
25 declare float @asinf(float)
26 declare float @atanf(float)
27 declare float @atan2f(float, float)
28 declare float @ceilf(float)
29 declare float @cosf(float)
30 declare float @coshf(float)
31 declare float @expf(float)
32 declare float @exp2f(float)
33 declare float @fabsf(float)
34 declare float @floorf(float)
35 declare float @fmodf(float, float)
36 declare float @logf(float)
37 declare float @log10f(float)
38 declare float @powf(float, float)
39 declare float @sinf(float)
40 declare float @sinhf(float)
41 declare float @sqrtf(float)
42 declare float @tanf(float)
43 declare float @tanhf(float)
4411
4512 define double @T() {
4613 ; CHECK-LABEL: @T(
10269 }
10370 declare double @llvm.pow.f64(double, double) nounwind readonly
10471
105 define double @test_acos() nounwind uwtable ssp {
106 entry:
107 ; CHECK-LABEL: @test_acos(
108 ; CHECK-NOT: call
109 %0 = call double @acos(double 3.000000e+00)
110 ret double %0
111 }
112
113 define double @test_asin() nounwind uwtable ssp {
114 entry:
115 ; CHECK-LABEL: @test_asin(
116 ; CHECK-NOT: call
117 %0 = call double @asin(double 3.000000e+00)
118 ret double %0
119 }
120
121 define double @test_atan() nounwind uwtable ssp {
122 entry:
123 ; CHECK-LABEL: @test_atan(
124 ; CHECK-NOT: call
125 %0 = call double @atan(double 3.000000e+00)
126 ret double %0
127 }
128
129 define double @test_atan2() nounwind uwtable ssp {
130 entry:
131 ; CHECK-LABEL: @test_atan2(
132 ; CHECK-NOT: call
133 %0 = call double @atan2(double 3.000000e+00, double 4.000000e+00)
134 ret double %0
135 }
136
137 define double @test_ceil() nounwind uwtable ssp {
138 entry:
139 ; CHECK-LABEL: @test_ceil(
140 ; CHECK-NOT: call
141 %0 = call double @ceil(double 3.000000e+00)
142 ret double %0
143 }
144
145 define double @test_cos() nounwind uwtable ssp {
146 entry:
147 ; CHECK-LABEL: @test_cos(
148 ; CHECK-NOT: call
149 %0 = call double @cos(double 3.000000e+00)
150 ret double %0
151 }
152
153 define double @test_cosh() nounwind uwtable ssp {
154 entry:
155 ; CHECK-LABEL: @test_cosh(
156 ; CHECK-NOT: call
157 %0 = call double @cosh(double 3.000000e+00)
158 ret double %0
159 }
160
161 define double @test_exp() nounwind uwtable ssp {
162 entry:
163 ; CHECK-LABEL: @test_exp(
164 ; CHECK-NOT: call
165 %0 = call double @exp(double 3.000000e+00)
166 ret double %0
167 }
168
169 define double @test_exp2() nounwind uwtable ssp {
170 entry:
171 ; CHECK-LABEL: @test_exp2(
172 ; CHECK-NOT: call
173 %0 = call double @exp2(double 3.000000e+00)
174 ret double %0
175 }
176
177 define double @test_fabs() nounwind uwtable ssp {
178 entry:
179 ; CHECK-LABEL: @test_fabs(
180 ; CHECK-NOT: call
181 %0 = call double @fabs(double 3.000000e+00)
182 ret double %0
183 }
184
185 define double @test_floor() nounwind uwtable ssp {
186 entry:
187 ; CHECK-LABEL: @test_floor(
188 ; CHECK-NOT: call
189 %0 = call double @floor(double 3.000000e+00)
190 ret double %0
191 }
192
193 define double @test_fmod() nounwind uwtable ssp {
194 entry:
195 ; CHECK-LABEL: @test_fmod(
196 ; CHECK-NOT: call
197 %0 = call double @fmod(double 3.000000e+00, double 4.000000e+00)
198 ret double %0
199 }
200
201 define double @test_log() nounwind uwtable ssp {
202 entry:
203 ; CHECK-LABEL: @test_log(
204 ; CHECK-NOT: call
205 %0 = call double @log(double 3.000000e+00)
206 ret double %0
207 }
208
209 define double @test_log10() nounwind uwtable ssp {
210 entry:
211 ; CHECK-LABEL: @test_log10(
212 ; CHECK-NOT: call
213 %0 = call double @log10(double 3.000000e+00)
214 ret double %0
215 }
216
217 define double @test_pow() nounwind uwtable ssp {
218 entry:
219 ; CHECK-LABEL: @test_pow(
220 ; CHECK-NOT: call
221 %0 = call double @pow(double 3.000000e+00, double 4.000000e+00)
222 ret double %0
223 }
224
225 define double @test_sin() nounwind uwtable ssp {
226 entry:
227 ; CHECK-LABEL: @test_sin(
228 ; CHECK-NOT: call
229 %0 = call double @sin(double 3.000000e+00)
230 ret double %0
231 }
232
233 define double @test_sinh() nounwind uwtable ssp {
234 entry:
235 ; CHECK-LABEL: @test_sinh(
236 ; CHECK-NOT: call
237 %0 = call double @sinh(double 3.000000e+00)
238 ret double %0
239 }
240
241 define double @test_sqrt() nounwind uwtable ssp {
242 entry:
243 ; CHECK-LABEL: @test_sqrt(
244 ; CHECK-NOT: call
245 %0 = call double @sqrt(double 3.000000e+00)
246 ret double %0
247 }
248
249 define double @test_tan() nounwind uwtable ssp {
250 entry:
251 ; CHECK-LABEL: @test_tan(
252 ; CHECK-NOT: call
253 %0 = call double @tan(double 3.000000e+00)
254 ret double %0
255 }
256
257 define double @test_tanh() nounwind uwtable ssp {
258 entry:
259 ; CHECK-LABEL: @test_tanh(
260 ; CHECK-NOT: call
261 %0 = call double @tanh(double 3.000000e+00)
262 ret double %0
263 }
264
265 define float @test_acosf() nounwind uwtable ssp {
266 entry:
267 ; CHECK-LABEL: @test_acosf(
268 ; CHECK-NOT: call
269 %0 = call float @acosf(float 3.000000e+00)
270 ret float %0
271 }
272
273 define float @test_asinf() nounwind uwtable ssp {
274 entry:
275 ; CHECK-LABEL: @test_asinf(
276 ; CHECK-NOT: call
277 %0 = call float @asinf(float 3.000000e+00)
278 ret float %0
279 }
280
281 define float @test_atanf() nounwind uwtable ssp {
282 entry:
283 ; CHECK-LABEL: @test_atanf(
284 ; CHECK-NOT: call
285 %0 = call float @atanf(float 3.000000e+00)
286 ret float %0
287 }
288
289 define float @test_atan2f() nounwind uwtable ssp {
290 entry:
291 ; CHECK-LABEL: @test_atan2f(
292 ; CHECK-NOT: call
293 %0 = call float @atan2f(float 3.000000e+00, float 4.000000e+00)
294 ret float %0
295 }
296
297 define float @test_ceilf() nounwind uwtable ssp {
298 entry:
299 ; CHECK-LABEL: @test_ceilf(
300 ; CHECK-NOT: call
301 %0 = call float @ceilf(float 3.000000e+00)
302 ret float %0
303 }
304
305 define float @test_cosf() nounwind uwtable ssp {
306 entry:
307 ; CHECK-LABEL: @test_cosf(
308 ; CHECK-NOT: call
309 %0 = call float @cosf(float 3.000000e+00)
310 ret float %0
311 }
312
313 define float @test_coshf() nounwind uwtable ssp {
314 entry:
315 ; CHECK-LABEL: @test_coshf(
316 ; CHECK-NOT: call
317 %0 = call float @coshf(float 3.000000e+00)
318 ret float %0
319 }
320
321 define float @test_expf() nounwind uwtable ssp {
322 entry:
323 ; CHECK-LABEL: @test_expf(
324 ; CHECK-NOT: call
325 %0 = call float @expf(float 3.000000e+00)
326 ret float %0
327 }
328
329 define float @test_exp2f() nounwind uwtable ssp {
330 entry:
331 ; CHECK-LABEL: @test_exp2f(
332 ; CHECK-NOT: call
333 %0 = call float @exp2f(float 3.000000e+00)
334 ret float %0
335 }
336
337 define float @test_fabsf() nounwind uwtable ssp {
338 entry:
339 ; CHECK-LABEL: @test_fabsf(
340 ; CHECK-NOT: call
341 %0 = call float @fabsf(float 3.000000e+00)
342 ret float %0
343 }
344
345 define float @test_floorf() nounwind uwtable ssp {
346 entry:
347 ; CHECK-LABEL: @test_floorf(
348 ; CHECK-NOT: call
349 %0 = call float @floorf(float 3.000000e+00)
350 ret float %0
351 }
352
353 define float @test_fmodf() nounwind uwtable ssp {
354 entry:
355 ; CHECK-LABEL: @test_fmodf(
356 ; CHECK-NOT: call
357 %0 = call float @fmodf(float 3.000000e+00, float 4.000000e+00)
358 ret float %0
359 }
360
361 define float @test_logf() nounwind uwtable ssp {
362 entry:
363 ; CHECK-LABEL: @test_logf(
364 ; CHECK-NOT: call
365 %0 = call float @logf(float 3.000000e+00)
366 ret float %0
367 }
368
369 define float @test_log10f() nounwind uwtable ssp {
370 entry:
371 ; CHECK-LABEL: @test_log10f(
372 ; CHECK-NOT: call
373 %0 = call float @log10f(float 3.000000e+00)
374 ret float %0
375 }
376
377 define float @test_powf() nounwind uwtable ssp {
378 entry:
379 ; CHECK-LABEL: @test_powf(
380 ; CHECK-NOT: call
381 %0 = call float @powf(float 3.000000e+00, float 4.000000e+00)
382 ret float %0
383 }
384
385 define float @test_sinf() nounwind uwtable ssp {
386 entry:
387 ; CHECK-LABEL: @test_sinf(
388 ; CHECK-NOT: call
389 %0 = call float @sinf(float 3.000000e+00)
390 ret float %0
391 }
392
393 define float @test_sinhf() nounwind uwtable ssp {
394 entry:
395 ; CHECK-LABEL: @test_sinhf(
396 ; CHECK-NOT: call
397 %0 = call float @sinhf(float 3.000000e+00)
398 ret float %0
399 }
400
401 define float @test_sqrtf() nounwind uwtable ssp {
402 entry:
403 ; CHECK-LABEL: @test_sqrtf(
404 ; CHECK-NOT: call
405 %0 = call float @sqrtf(float 3.000000e+00)
406 ret float %0
407 }
408
409 define float @test_tanf() nounwind uwtable ssp {
410 entry:
411 ; CHECK-LABEL: @test_tanf(
412 ; CHECK-NOT: call
413 %0 = call float @tanf(float 3.000000e+00)
414 ret float %0
415 }
416
417 define float @test_tanhf() nounwind uwtable ssp {
418 entry:
419 ; CHECK-LABEL: @test_tanhf(
420 ; CHECK-NOT: call
421 %0 = call float @tanhf(float 3.000000e+00)
422 ret float %0
423 }
424
425 ; Shouldn't fold because of -fno-builtin
426 define double @acos_() nounwind uwtable ssp {
427 ; FNOBUILTIN-LABEL: @acos_(
428 ; FNOBUILTIN: %1 = call double @acos(double 3.000000e+00)
429 %1 = call double @acos(double 3.000000e+00)
430 ret double %1
431 }
432
433 ; Shouldn't fold because of -fno-builtin
434 define double @asin_() nounwind uwtable ssp {
435 ; FNOBUILTIN-LABEL: @asin_(
436 ; FNOBUILTIN: %1 = call double @asin(double 3.000000e+00)
437 %1 = call double @asin(double 3.000000e+00)
438 ret double %1
439 }
440
441 ; Shouldn't fold because of -fno-builtin
442 define double @atan_() nounwind uwtable ssp {
443 ; FNOBUILTIN-LABEL: @atan_(
444 ; FNOBUILTIN: %1 = call double @atan(double 3.000000e+00)
445 %1 = call double @atan(double 3.000000e+00)
446 ret double %1
447 }
448
449 ; Shouldn't fold because of -fno-builtin
450 define double @atan2_() nounwind uwtable ssp {
451 ; FNOBUILTIN-LABEL: @atan2_(
452 ; FNOBUILTIN: %1 = call double @atan2(double 3.000000e+00, double 4.000000e+00)
453 %1 = call double @atan2(double 3.000000e+00, double 4.000000e+00)
454 ret double %1
455 }
456
457 ; Shouldn't fold because of -fno-builtin
458 define double @ceil_() nounwind uwtable ssp {
459 ; FNOBUILTIN-LABEL: @ceil_(
460 ; FNOBUILTIN: %1 = call double @ceil(double 3.000000e+00)
461 %1 = call double @ceil(double 3.000000e+00)
462 ret double %1
463 }
464
465 ; Shouldn't fold because of -fno-builtin
466 define double @cos_() nounwind uwtable ssp {
467 ; FNOBUILTIN-LABEL: @cos_(
468 ; FNOBUILTIN: %1 = call double @cos(double 3.000000e+00)
469 %1 = call double @cos(double 3.000000e+00)
470 ret double %1
471 }
472
473 ; Shouldn't fold because of -fno-builtin
474 define double @cosh_() nounwind uwtable ssp {
475 ; FNOBUILTIN-LABEL: @cosh_(
476 ; FNOBUILTIN: %1 = call double @cosh(double 3.000000e+00)
477 %1 = call double @cosh(double 3.000000e+00)
478 ret double %1
479 }
480
481 ; Shouldn't fold because of -fno-builtin
482 define double @exp_() nounwind uwtable ssp {
483 ; FNOBUILTIN-LABEL: @exp_(
484 ; FNOBUILTIN: %1 = call double @exp(double 3.000000e+00)
485 %1 = call double @exp(double 3.000000e+00)
486 ret double %1
487 }
488
489 ; Shouldn't fold because of -fno-builtin
490 define double @exp2_() nounwind uwtable ssp {
491 ; FNOBUILTIN-LABEL: @exp2_(
492 ; FNOBUILTIN: %1 = call double @exp2(double 3.000000e+00)
493 %1 = call double @exp2(double 3.000000e+00)
494 ret double %1
495 }
496
497 ; Shouldn't fold because of -fno-builtin
498 define double @fabs_() nounwind uwtable ssp {
499 ; FNOBUILTIN-LABEL: @fabs_(
500 ; FNOBUILTIN: %1 = call double @fabs(double 3.000000e+00)
501 %1 = call double @fabs(double 3.000000e+00)
502 ret double %1
503 }
504
505 ; Shouldn't fold because of -fno-builtin
506 define double @floor_() nounwind uwtable ssp {
507 ; FNOBUILTIN-LABEL: @floor_(
508 ; FNOBUILTIN: %1 = call double @floor(double 3.000000e+00)
509 %1 = call double @floor(double 3.000000e+00)
510 ret double %1
511 }
512
513 ; Shouldn't fold because of -fno-builtin
514 define double @fmod_() nounwind uwtable ssp {
515 ; FNOBUILTIN-LABEL: @fmod_(
516 ; FNOBUILTIN: %1 = call double @fmod(double 3.000000e+00, double 4.000000e+00)
517 %1 = call double @fmod(double 3.000000e+00, double 4.000000e+00)
518 ret double %1
519 }
520
521 ; Shouldn't fold because of -fno-builtin
522 define double @log_() nounwind uwtable ssp {
523 ; FNOBUILTIN-LABEL: @log_(
524 ; FNOBUILTIN: %1 = call double @log(double 3.000000e+00)
525 %1 = call double @log(double 3.000000e+00)
526 ret double %1
527 }
528
529 ; Shouldn't fold because of -fno-builtin
530 define double @log10_() nounwind uwtable ssp {
531 ; FNOBUILTIN-LABEL: @log10_(
532 ; FNOBUILTIN: %1 = call double @log10(double 3.000000e+00)
533 %1 = call double @log10(double 3.000000e+00)
534 ret double %1
535 }
536
537 ; Shouldn't fold because of -fno-builtin
538 define double @pow_() nounwind uwtable ssp {
539 ; FNOBUILTIN-LABEL: @pow_(
540 ; FNOBUILTIN: %1 = call double @pow(double 3.000000e+00, double 4.000000e+00)
541 %1 = call double @pow(double 3.000000e+00, double 4.000000e+00)
542 ret double %1
543 }
544
54572 ; Shouldn't fold because of -fno-builtin
54673 define double @sin_() nounwind uwtable ssp {
54774 ; FNOBUILTIN-LABEL: @sin_(
54875 ; FNOBUILTIN: %1 = call double @sin(double 3.000000e+00)
54976 %1 = call double @sin(double 3.000000e+00)
550 ret double %1
551 }
552
553 ; Shouldn't fold because of -fno-builtin
554 define double @sinh_() nounwind uwtable ssp {
555 ; FNOBUILTIN-LABEL: @sinh_(
556 ; FNOBUILTIN: %1 = call double @sinh(double 3.000000e+00)
557 %1 = call double @sinh(double 3.000000e+00)
55877 ret double %1
55978 }
56079
56584 %1 = call double @sqrt(double 3.000000e+00)
56685 ret double %1
56786 }
87
88 ; Shouldn't fold because of -fno-builtin
89 define float @sqrtf_() nounwind uwtable ssp {
90 ; FNOBUILTIN-LABEL: @sqrtf_(
91 ; FNOBUILTIN: %1 = call float @sqrtf(float 3.000000e+00)
92 %1 = call float @sqrtf(float 3.000000e+00)
93 ret float %1
94 }
95 declare float @sqrtf(float)
96
97 ; Shouldn't fold because of -fno-builtin
98 define float @sinf_() nounwind uwtable ssp {
99 ; FNOBUILTIN-LABEL: @sinf_(
100 ; FNOBUILTIN: %1 = call float @sinf(float 3.000000e+00)
101 %1 = call float @sinf(float 3.000000e+00)
102 ret float %1
103 }
104 declare float @sinf(float)
568105
569106 ; Shouldn't fold because of -fno-builtin
570107 define double @tan_() nounwind uwtable ssp {
581118 %1 = call double @tanh(double 3.000000e+00)
582119 ret double %1
583120 }
121 declare double @tanh(double)
584122
585123 ; Shouldn't fold because of -fno-builtin
586 define float @acosf_() nounwind uwtable ssp {
587 ; FNOBUILTIN-LABEL: @acosf_(
588 ; FNOBUILTIN: %1 = call float @acosf(float 3.000000e+00)
589 %1 = call float @acosf(float 3.000000e+00)
590 ret float %1
124 define double @pow_() nounwind uwtable ssp {
125 ; FNOBUILTIN-LABEL: @pow_(
126 ; FNOBUILTIN: %1 = call double @pow(double 3.000000e+00, double 3.000000e+00)
127 %1 = call double @pow(double 3.000000e+00, double 3.000000e+00)
128 ret double %1
591129 }
130 declare double @pow(double, double)
592131
593132 ; Shouldn't fold because of -fno-builtin
594 define float @asinf_() nounwind uwtable ssp {
595 ; FNOBUILTIN-LABEL: @asinf_(
596 ; FNOBUILTIN: %1 = call float @asinf(float 3.000000e+00)
597 %1 = call float @asinf(float 3.000000e+00)
598 ret float %1
133 define double @fmod_() nounwind uwtable ssp {
134 ; FNOBUILTIN-LABEL: @fmod_(
135 ; FNOBUILTIN: %1 = call double @fmod(double 3.000000e+00, double 3.000000e+00)
136 %1 = call double @fmod(double 3.000000e+00, double 3.000000e+00)
137 ret double %1
599138 }
139 declare double @fmod(double, double)
600140
601141 ; Shouldn't fold because of -fno-builtin
602 define float @atanf_() nounwind uwtable ssp {
603 ; FNOBUILTIN-LABEL: @atanf_(
604 ; FNOBUILTIN: %1 = call float @atanf(float 3.000000e+00)
605 %1 = call float @atanf(float 3.000000e+00)
606 ret float %1
142 define double @atan2_() nounwind uwtable ssp {
143 ; FNOBUILTIN-LABEL: @atan2_(
144 ; FNOBUILTIN: %1 = call double @atan2(double 3.000000e+00, double 3.000000e+00)
145 %1 = call double @atan2(double 3.000000e+00, double 3.000000e+00)
146 ret double %1
607147 }
608
609 ; Shouldn't fold because of -fno-builtin
610 define float @atan2f_() nounwind uwtable ssp {
611 ; FNOBUILTIN-LABEL: @atan2f_(
612 ; FNOBUILTIN: %1 = call float @atan2f(float 3.000000e+00, float 4.000000e+00)
613 %1 = call float @atan2f(float 3.000000e+00, float 4.000000e+00)
614 ret float %1
615 }
616
617 ; Shouldn't fold because of -fno-builtin
618 define float @ceilf_() nounwind uwtable ssp {
619 ; FNOBUILTIN-LABEL: @ceilf_(
620 ; FNOBUILTIN: %1 = call float @ceilf(float 3.000000e+00)
621 %1 = call float @ceilf(float 3.000000e+00)
622 ret float %1
623 }
624
625 ; Shouldn't fold because of -fno-builtin
626 define float @cosf_() nounwind uwtable ssp {
627 ; FNOBUILTIN-LABEL: @cosf_(
628 ; FNOBUILTIN: %1 = call float @cosf(float 3.000000e+00)
629 %1 = call float @cosf(float 3.000000e+00)
630 ret float %1
631 }
632
633 ; Shouldn't fold because of -fno-builtin
634 define float @coshf_() nounwind uwtable ssp {
635 ; FNOBUILTIN-LABEL: @coshf_(
636 ; FNOBUILTIN: %1 = call float @coshf(float 3.000000e+00)
637 %1 = call float @coshf(float 3.000000e+00)
638 ret float %1
639 }
640
641 ; Shouldn't fold because of -fno-builtin
642 define float @expf_() nounwind uwtable ssp {
643 ; FNOBUILTIN-LABEL: @expf_(
644 ; FNOBUILTIN: %1 = call float @expf(float 3.000000e+00)
645 %1 = call float @expf(float 3.000000e+00)
646 ret float %1
647 }
648
649 ; Shouldn't fold because of -fno-builtin
650 define float @exp2f_() nounwind uwtable ssp {
651 ; FNOBUILTIN-LABEL: @exp2f_(
652 ; FNOBUILTIN: %1 = call float @exp2f(float 3.000000e+00)
653 %1 = call float @exp2f(float 3.000000e+00)
654 ret float %1
655 }
656
657 ; Shouldn't fold because of -fno-builtin
658 define float @fabsf_() nounwind uwtable ssp {
659 ; FNOBUILTIN-LABEL: @fabsf_(
660 ; FNOBUILTIN: %1 = call float @fabsf(float 3.000000e+00)
661 %1 = call float @fabsf(float 3.000000e+00)
662 ret float %1
663 }
664
665 ; Shouldn't fold because of -fno-builtin
666 define float @floorf_() nounwind uwtable ssp {
667 ; FNOBUILTIN-LABEL: @floorf_(
668 ; FNOBUILTIN: %1 = call float @floorf(float 3.000000e+00)
669 %1 = call float @floorf(float 3.000000e+00)
670 ret float %1
671 }
672
673 ; Shouldn't fold because of -fno-builtin
674 define float @fmodf_() nounwind uwtable ssp {
675 ; FNOBUILTIN-LABEL: @fmodf_(
676 ; FNOBUILTIN: %1 = call float @fmodf(float 3.000000e+00, float 4.000000e+00)
677 %1 = call float @fmodf(float 3.000000e+00, float 4.000000e+00)
678 ret float %1
679 }
680
681 ; Shouldn't fold because of -fno-builtin
682 define float @logf_() nounwind uwtable ssp {
683 ; FNOBUILTIN-LABEL: @logf_(
684 ; FNOBUILTIN: %1 = call float @logf(float 3.000000e+00)
685 %1 = call float @logf(float 3.000000e+00)
686 ret float %1
687 }
688
689 ; Shouldn't fold because of -fno-builtin
690 define float @log10f_() nounwind uwtable ssp {
691 ; FNOBUILTIN-LABEL: @log10f_(
692 ; FNOBUILTIN: %1 = call float @log10f(float 3.000000e+00)
693 %1 = call float @log10f(float 3.000000e+00)
694 ret float %1
695 }
696
697 ; Shouldn't fold because of -fno-builtin
698 define float @powf_() nounwind uwtable ssp {
699 ; FNOBUILTIN-LABEL: @powf_(
700 ; FNOBUILTIN: %1 = call float @powf(float 3.000000e+00, float 4.000000e+00)
701 %1 = call float @powf(float 3.000000e+00, float 4.000000e+00)
702 ret float %1
703 }
704
705 ; Shouldn't fold because of -fno-builtin
706 define float @sinf_() nounwind uwtable ssp {
707 ; FNOBUILTIN-LABEL: @sinf_(
708 ; FNOBUILTIN: %1 = call float @sinf(float 3.000000e+00)
709 %1 = call float @sinf(float 3.000000e+00)
710 ret float %1
711 }
712
713 ; Shouldn't fold because of -fno-builtin
714 define float @sinhf_() nounwind uwtable ssp {
715 ; FNOBUILTIN-LABEL: @sinhf_(
716 ; FNOBUILTIN: %1 = call float @sinhf(float 3.000000e+00)
717 %1 = call float @sinhf(float 3.000000e+00)
718 ret float %1
719 }
720
721 ; Shouldn't fold because of -fno-builtin
722 define float @sqrtf_() nounwind uwtable ssp {
723 ; FNOBUILTIN-LABEL: @sqrtf_(
724 ; FNOBUILTIN: %1 = call float @sqrtf(float 3.000000e+00)
725 %1 = call float @sqrtf(float 3.000000e+00)
726 ret float %1
727 }
728
729 ; Shouldn't fold because of -fno-builtin
730 define float @tanf_() nounwind uwtable ssp {
731 ; FNOBUILTIN-LABEL: @tanf_(
732 ; FNOBUILTIN: %1 = call float @tanf(float 3.000000e+00)
733 %1 = call float @tanf(float 3.000000e+00)
734 ret float %1
735 }
736
737 ; Shouldn't fold because of -fno-builtin
738 define float @tanhf_() nounwind uwtable ssp {
739 ; FNOBUILTIN-LABEL: @tanhf_(
740 ; FNOBUILTIN: %1 = call float @tanhf(float 3.000000e+00)
741 %1 = call float @tanhf(float 3.000000e+00)
742 ret float %1
743 }
148 declare double @atan2(double, double)