1 // RUN: %clang_cc1 -triple x86_64-apple-darwin12 -S -o - -emit-llvm %s | FileCheck %s -check-prefix=CHECK-NOERRNO
2 // RUN: %clang_cc1 -triple x86_64-linux-gnu -S -o - -emit-llvm -fmath-errno %s | FileCheck %s -check-prefix=CHECK-ERRNO
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin12 -S -o - -emit-llvm -x c++ %s | FileCheck %s -check-prefix=CHECK-NOERRNO
4 // RUN: %clang_cc1 -triple x86_64-linux-gnu -S -o - -emit-llvm -x c++ -fmath-errno %s | FileCheck %s -check-prefix=CHECK-ERRNO
5 
6 // Prototypes.
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 double atan2(double, double);
11 float atan2f(float, float);
12 long double atan2l(long double, long double);
13 int abs(int);
14 long int labs(long int);
15 long long int llabs(long long int);
16 double copysign(double, double);
17 float copysignf(float, float);
18 long double copysignl(long double, long double);
19 double fabs(double);
20 float fabsf(float);
21 long double fabsl(long double);
22 double fmod(double, double);
23 float fmodf(float, float);
24 long double fmodl(long double, long double);
25 double frexp(double, int *);
26 float frexpf(float, int *);
27 long double frexpl(long double, int *);
28 double ldexp(double, int);
29 float ldexpf(float, int);
30 long double ldexpl(long double, int);
31 double modf(double, double *);
32 float modff(float, float *);
33 long double modfl(long double, long double *);
34 double nan(const char *);
35 float nanf(const char *);
36 long double nanl(const char *);
37 double pow(double, double);
38 float powf(float, float);
39 long double powl(long double, long double);
40 double acos(double);
41 float acosf(float);
42 long double acosl(long double);
43 double acosh(double);
44 float acoshf(float);
45 long double acoshl(long double);
46 double asin(double);
47 float asinf(float);
48 long double asinl(long double);
49 double asinh(double);
50 float asinhf(float);
51 long double asinhl(long double);
52 double atan(double);
53 float atanf(float);
54 long double atanl( long double);
55 double atanh(double);
56 float atanhf(float);
57 long double atanhl(long double);
58 double cbrt(double);
59 float cbrtf(float);
60 long double cbrtl(long double);
61 double ceil(double);
62 float ceilf(float);
63 long double ceill(long double);
64 double cos(double);
65 float cosf(float);
66 long double cosl(long double);
67 double cosh(double);
68 float coshf(float);
69 long double coshl(long double);
70 double erf(double);
71 float erff(float);
72 long double erfl(long double);
73 double erfc(double);
74 float erfcf(float);
75 long double erfcl(long double);
76 double exp(double);
77 float expf(float);
78 long double expl(long double);
79 double exp2(double);
80 float exp2f(float);
81 long double exp2l(long double);
82 double expm1(double);
83 float expm1f(float);
84 long double expm1l(long double);
85 double fdim(double, double);
86 float fdimf(float, float);
87 long double fdiml(long double, long double);
88 double floor(double);
89 float floorf(float);
90 long double floorl(long double);
91 double fma(double, double, double);
92 float fmaf(float, float, float);
93 long double fmal(long double, long double, long double);
94 double fmax(double, double);
95 float fmaxf(float, float);
96 long double fmaxl(long double, long double);
97 double fmin(double, double);
98 float fminf(float, float);
99 long double fminl(long double, long double);
100 double hypot(double, double);
101 float hypotf(float, float);
102 long double hypotl(long double, long double);
103 int ilogb(double);
104 int ilogbf(float);
105 int ilogbl(long double);
106 double lgamma(double);
107 float lgammaf(float);
108 long double lgammal(long double);
109 long long int llrint(double);
110 long long int llrintf(float);
111 long long int llrintl(long double);
112 long long int llround(double);
113 long long int llroundf(float);
114 long long int llroundl(long double);
115 double log(double);
116 float logf(float);
117 long double logl(long double);
118 double log10(double);
119 float log10f(float);
120 long double log10l(long double);
121 double log1p(double);
122 float log1pf(float);
123 long double log1pl(long double);
124 double log2(double);
125 float log2f(float);
126 long double log2l(long double);
127 double logb(double);
128 float logbf(float);
129 long double logbl(long double);
130 long int lrint(double);
131 long int lrintf(float);
132 long int lrintl(long double);
133 long int lround(double);
134 long int lroundf(float);
135 long int lroundl(long double);
136 double nearbyint(double);
137 float nearbyintf(float);
138 long double nearbyintl(long double);
139 double nextafter(double, double);
140 float nextafterf(float, float);
141 long double nextafterl(long double, long double);
142 double nexttoward(double, long double);
143 float nexttowardf(float, long double);
144 long double nexttowardl(long double, long double);
145 double remainder(double, double);
146 float remainderf(float, float);
147 long double remainderl(long double, long double);
148 double rint(double);
149 float rintf(float);
150 long double rintl(long double);
151 double round(double);
152 float roundf(float);
153 long double roundl(long double);
154 double scalbln(double, long int exp);
155 float scalblnf(float, long int exp);
156 long double scalblnl(long double, long int exp);
157 double scalbn(double, int exp);
158 float scalbnf(float, int exp);
159 long double scalbnl(long double, int exp);
160 double sin(double);
161 float sinf(float);
162 long double sinl(long double);
163 double sinh(double);
164 float sinhf(float);
165 long double sinhl(long double);
166 double sqrt(double);
167 float sqrtf(float);
168 long double sqrtl(long double);
169 double tan(double);
170 float tanf(float);
171 long double tanl(long double);
172 double tanh(double);
173 float tanhf(float);
174 long double tanhl(long double);
175 double tgamma(double);
176 float tgammaf(float);
177 long double tgammal(long double);
178 double trunc(double);
179 float truncf(float);
180 long double truncl(long double);
181 double cabs(double _Complex);
182 float cabsf(float _Complex);
183 long double cabsl(long double _Complex);
184 double _Complex cacos(double _Complex);
185 float _Complex cacosf(float _Complex);
186 long double _Complex cacosl(long double _Complex);
187 double _Complex cacosh(double _Complex);
188 float _Complex cacoshf(float _Complex);
189 long double _Complex cacoshl(long double _Complex);
190 double carg(double _Complex);
191 float cargf(float _Complex);
192 long double cargl(long double _Complex);
193 double _Complex casin(double _Complex);
194 float _Complex casinf(float _Complex);
195 long double _Complex casinl(long double _Complex);
196 double _Complex casinh(double _Complex);
197 float _Complex casinhf(float _Complex);
198 long double _Complex casinhl(long double _Complex);
199 double _Complex catan(double _Complex);
200 float _Complex catanf(float _Complex);
201 long double _Complex catanl(long double _Complex);
202 double _Complex catanh(double _Complex);
203 float _Complex catanhf(float _Complex);
204 long double _Complex catanhl(long double _Complex);
205 double _Complex ccos(double _Complex);
206 float _Complex ccosf(float _Complex);
207 long double _Complex ccosl(long double _Complex);
208 double _Complex ccosh(double _Complex);
209 float _Complex ccoshf(float _Complex);
210 long double _Complex ccoshl(long double _Complex);
211 double _Complex cexp(double _Complex);
212 float _Complex cexpf(float _Complex);
213 long double _Complex cexpl(long double _Complex);
214 double cimag(double _Complex);
215 float cimagf(float _Complex);
216 long double cimagl(long double _Complex);
217 double _Complex conj(double _Complex);
218 float _Complex conjf(float _Complex);
219 long double _Complex conjl(long double _Complex);
220 double _Complex clog(double _Complex);
221 float _Complex clogf(float _Complex);
222 long double _Complex clogl(long double _Complex);
223 double _Complex cproj(double _Complex);
224 float _Complex cprojf(float _Complex);
225 long double _Complex cprojl(long double _Complex);
226 double _Complex cpow(double _Complex, _Complex double);
227 float _Complex cpowf(float _Complex, _Complex float);
228 long double _Complex cpowl(long double _Complex, _Complex long double);
229 double creal(double _Complex);
230 float crealf(float _Complex);
231 long double creall(long double _Complex);
232 double _Complex csin(double _Complex);
233 float _Complex csinf(float _Complex);
234 long double _Complex csinl(long double _Complex);
235 double _Complex csinh(double _Complex);
236 float _Complex csinhf(float _Complex);
237 long double _Complex csinhl(long double _Complex);
238 double _Complex csqrt(double _Complex);
239 float _Complex csqrtf(float _Complex);
240 long double _Complex csqrtl(long double _Complex);
241 double _Complex ctan(double _Complex);
242 float _Complex ctanf(float _Complex);
243 long double _Complex ctanl(long double _Complex);
244 double _Complex ctanh(double _Complex);
245 float _Complex ctanhf(float _Complex);
246 long double _Complex ctanhl(long double _Complex);
247 
248 double __sinpi(double);
249 float __sinpif(float);
250 double __cospi(double);
251 float __cospif(float);
252 double __tanpi(double);
253 float __tanpif(float);
254 
255 double __exp10(double);
256 float __exp10f(float);
257 #ifdef __cplusplus
258 }
259 #endif
260 
261 // Force emission of the declare statements.
262 #define F(x) ((void*)x)
263 void *use[] = {
264   F(atan2),      F(atan2f),     F(atan2l),     F(abs),         F(labs),
265   F(llabs),      F(copysign),   F(copysignf),  F(copysignl),   F(fabs),
266   F(fabsf),      F(fabsl),      F(fmod),       F(fmodf),       F(fmodl),
267   F(frexp),      F(frexpf),     F(frexpl),     F(ldexp),       F(ldexpf),
268   F(ldexpl),     F(modf),       F(modff),      F(modfl),       F(nan),
269   F(nanf),       F(nanl),       F(pow),        F(powf),        F(powl),
270   F(acos),       F(acosf),      F(acosl),      F(acosh),       F(acoshf),
271   F(acoshl),     F(asin),       F(asinf),      F(asinl),       F(asinh),
272   F(asinhf),     F(asinhl),     F(atan),       F(atanf),       F(atanl),
273   F(atanh),      F(atanhf),     F(atanhl),     F(cbrt),        F(cbrtf),
274   F(cbrtl),      F(ceil),       F(ceilf),      F(ceill),       F(cos),
275   F(cosf),       F(cosl),       F(cosh),       F(coshf),       F(coshl),
276   F(erf),        F(erff),       F(erfl),       F(erfc),        F(erfcf),
277   F(erfcl),      F(exp),        F(expf),       F(expl),        F(exp2),
278   F(exp2f),      F(exp2l),      F(expm1),      F(expm1f),      F(expm1l),
279   F(fdim),       F(fdimf),      F(fdiml),      F(floor),       F(floorf),
280   F(floorl),     F(fma),        F(fmaf),       F(fmal),        F(fmax),
281   F(fmaxf),      F(fmaxl),      F(fmin),       F(fminf),       F(fminl),
282   F(hypot),      F(hypotf),     F(hypotl),     F(ilogb),       F(ilogbf),
283   F(ilogbl),     F(lgamma),     F(lgammaf),    F(lgammal),     F(llrint),
284   F(llrintf),    F(llrintl),    F(llround),    F(llroundf),    F(llroundl),
285   F(log),        F(logf),       F(logl),       F(log10),       F(log10f),
286   F(log10l),     F(log1p),      F(log1pf),     F(log1pl),      F(log2),
287   F(log2f),      F(log2l),      F(logb),       F(logbf),       F(logbl),
288   F(lrint),      F(lrintf),     F(lrintl),     F(lround),      F(lroundf),
289   F(lroundl),    F(nearbyint),  F(nearbyintf), F(nearbyintl),  F(nextafter),
290   F(nextafterf), F(nextafterl), F(nexttoward), F(nexttowardf), F(nexttowardl),
291   F(remainder),  F(remainderf), F(remainderl), F(rint),        F(rintf),
292   F(rintl),      F(round),      F(roundf),     F(roundl),      F(scalbln),
293   F(scalblnf),   F(scalblnl),   F(scalbn),     F(scalbnf),     F(scalbnl),
294   F(sin),        F(sinf),       F(sinl),       F(sinh),        F(sinhf),
295   F(sinhl),      F(sqrt),       F(sqrtf),      F(sqrtl),       F(tan),
296   F(tanf),       F(tanl),       F(tanh),       F(tanhf),       F(tanhl),
297   F(tgamma),     F(tgammaf),    F(tgammal),    F(trunc),       F(truncf),
298   F(truncl),     F(cabs),       F(cabsf),      F(cabsl),       F(cacos),
299   F(cacosf),     F(cacosl),     F(cacosh),     F(cacoshf),     F(cacoshl),
300   F(carg),       F(cargf),      F(cargl),      F(casin),       F(casinf),
301   F(casinl),     F(casinh),     F(casinhf),    F(casinhl),     F(catan),
302   F(catanf),     F(catanl),     F(catanh),     F(catanhf),     F(catanhl),
303   F(ccos),       F(ccosf),      F(ccosl),      F(ccosh),       F(ccoshf),
304   F(ccoshl),     F(cexp),       F(cexpf),      F(cexpl),       F(cimag),
305   F(cimagf),     F(cimagl),     F(conj),       F(conjf),       F(conjl),
306   F(clog),       F(clogf),      F(clogl),      F(cproj),       F(cprojf),
307   F(cprojl),     F(cpow),       F(cpowf),      F(cpowl),       F(creal),
308   F(crealf),     F(creall),     F(csin),       F(csinf),       F(csinl),
309   F(csinh),      F(csinhf),     F(csinhl),     F(csqrt),       F(csqrtf),
310   F(csqrtl),     F(ctan),       F(ctanf),      F(ctanl),       F(ctanh),
311   F(ctanhf),     F(ctanhl),     F(__sinpi),    F(__sinpif),    F(__cospi),
312   F(__cospif),   F(__tanpi),    F(__tanpif),   F(__exp10),     F(__exp10f)
313 };
314 
315 // CHECK-NOERRNO: declare double @atan2(double, double) [[NUW:#[0-9]+]]
316 // CHECK-NOERRNO: declare float @atan2f(float, float) [[NUW]]
317 // CHECK-NOERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NUW]]
318 // CHECK-NOERRNO: declare i32 @abs(i32) [[NUW]]
319 // CHECK-NOERRNO: declare i64 @labs(i64) [[NUW]]
320 // CHECK-NOERRNO: declare i64 @llabs(i64) [[NUW]]
321 // CHECK-NOERRNO: declare double @copysign(double, double) [[NUW]]
322 // CHECK-NOERRNO: declare float @copysignf(float, float) [[NUW]]
323 // CHECK-NOERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) [[NUW]]
324 // CHECK-NOERRNO: declare double @fabs(double) [[NUW]]
325 // CHECK-NOERRNO: declare float @fabsf(float) [[NUW]]
326 // CHECK-NOERRNO: declare x86_fp80 @fabsl(x86_fp80) [[NUW]]
327 // CHECK-NOERRNO: declare double @fmod(double, double) [[NUW]]
328 // CHECK-NOERRNO: declare float @fmodf(float, float) [[NUW]]
329 // CHECK-NOERRNO: declare x86_fp80 @fmodl(x86_fp80, x86_fp80) [[NUW]]
330 // CHECK-NOERRNO: declare double @ldexp(double, i32) [[NUW]]
331 // CHECK-NOERRNO: declare float @ldexpf(float, i32) [[NUW]]
332 // CHECK-NOERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[NUW]]
333 // CHECK-NOERRNO: declare double @nan(i8*) [[NUW]]
334 // CHECK-NOERRNO: declare float @nanf(i8*) [[NUW]]
335 // CHECK-NOERRNO: declare x86_fp80 @nanl(i8*) [[NUW]]
336 // CHECK-NOERRNO: declare double @pow(double, double) [[NUW]]
337 // CHECK-NOERRNO: declare float @powf(float, float) [[NUW]]
338 // CHECK-NOERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[NUW]]
339 // CHECK-NOERRNO: declare double @acos(double) [[NUW]]
340 // CHECK-NOERRNO: declare float @acosf(float) [[NUW]]
341 // CHECK-NOERRNO: declare x86_fp80 @acosl(x86_fp80) [[NUW]]
342 // CHECK-NOERRNO: declare double @acosh(double) [[NUW]]
343 // CHECK-NOERRNO: declare float @acoshf(float) [[NUW]]
344 // CHECK-NOERRNO: declare x86_fp80 @acoshl(x86_fp80) [[NUW]]
345 // CHECK-NOERRNO: declare double @asin(double) [[NUW]]
346 // CHECK-NOERRNO: declare float @asinf(float) [[NUW]]
347 // CHECK-NOERRNO: declare x86_fp80 @asinl(x86_fp80) [[NUW]]
348 // CHECK-NOERRNO: declare double @asinh(double) [[NUW]]
349 // CHECK-NOERRNO: declare float @asinhf(float) [[NUW]]
350 // CHECK-NOERRNO: declare x86_fp80 @asinhl(x86_fp80) [[NUW]]
351 // CHECK-NOERRNO: declare double @atan(double) [[NUW]]
352 // CHECK-NOERRNO: declare float @atanf(float) [[NUW]]
353 // CHECK-NOERRNO: declare x86_fp80 @atanl(x86_fp80) [[NUW]]
354 // CHECK-NOERRNO: declare double @atanh(double) [[NUW]]
355 // CHECK-NOERRNO: declare float @atanhf(float) [[NUW]]
356 // CHECK-NOERRNO: declare x86_fp80 @atanhl(x86_fp80) [[NUW]]
357 // CHECK-NOERRNO: declare double @cbrt(double) [[NUW]]
358 // CHECK-NOERRNO: declare float @cbrtf(float) [[NUW]]
359 // CHECK-NOERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[NUW]]
360 // CHECK-NOERRNO: declare double @ceil(double) [[NUW]]
361 // CHECK-NOERRNO: declare float @ceilf(float) [[NUW]]
362 // CHECK-NOERRNO: declare x86_fp80 @ceill(x86_fp80) [[NUW]]
363 // CHECK-NOERRNO: declare double @cos(double) [[NUW]]
364 // CHECK-NOERRNO: declare float @cosf(float) [[NUW]]
365 // CHECK-NOERRNO: declare x86_fp80 @cosl(x86_fp80) [[NUW]]
366 // CHECK-NOERRNO: declare double @cosh(double) [[NUW]]
367 // CHECK-NOERRNO: declare float @coshf(float) [[NUW]]
368 // CHECK-NOERRNO: declare x86_fp80 @coshl(x86_fp80) [[NUW]]
369 // CHECK-NOERRNO: declare double @erf(double) [[NUW]]
370 // CHECK-NOERRNO: declare float @erff(float) [[NUW]]
371 // CHECK-NOERRNO: declare x86_fp80 @erfl(x86_fp80) [[NUW]]
372 // CHECK-NOERRNO: declare double @erfc(double) [[NUW]]
373 // CHECK-NOERRNO: declare float @erfcf(float) [[NUW]]
374 // CHECK-NOERRNO: declare x86_fp80 @erfcl(x86_fp80) [[NUW]]
375 // CHECK-NOERRNO: declare double @exp(double) [[NUW]]
376 // CHECK-NOERRNO: declare float @expf(float) [[NUW]]
377 // CHECK-NOERRNO: declare x86_fp80 @expl(x86_fp80) [[NUW]]
378 // CHECK-NOERRNO: declare double @exp2(double) [[NUW]]
379 // CHECK-NOERRNO: declare float @exp2f(float) [[NUW]]
380 // CHECK-NOERRNO: declare x86_fp80 @exp2l(x86_fp80) [[NUW]]
381 // CHECK-NOERRNO: declare double @expm1(double) [[NUW]]
382 // CHECK-NOERRNO: declare float @expm1f(float) [[NUW]]
383 // CHECK-NOERRNO: declare x86_fp80 @expm1l(x86_fp80) [[NUW]]
384 // CHECK-NOERRNO: declare double @fdim(double, double) [[NUW]]
385 // CHECK-NOERRNO: declare float @fdimf(float, float) [[NUW]]
386 // CHECK-NOERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[NUW]]
387 // CHECK-NOERRNO: declare double @floor(double) [[NUW]]
388 // CHECK-NOERRNO: declare float @floorf(float) [[NUW]]
389 // CHECK-NOERRNO: declare x86_fp80 @floorl(x86_fp80) [[NUW]]
390 // CHECK-NOERRNO: declare double @fma(double, double, double) [[NUW]]
391 // CHECK-NOERRNO: declare float @fmaf(float, float, float) [[NUW]]
392 // CHECK-NOERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[NUW]]
393 // CHECK-NOERRNO: declare double @fmax(double, double) [[NUW]]
394 // CHECK-NOERRNO: declare float @fmaxf(float, float) [[NUW]]
395 // CHECK-NOERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) [[NUW]]
396 // CHECK-NOERRNO: declare double @fmin(double, double) [[NUW]]
397 // CHECK-NOERRNO: declare float @fminf(float, float) [[NUW]]
398 // CHECK-NOERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) [[NUW]]
399 // CHECK-NOERRNO: declare double @hypot(double, double) [[NUW]]
400 // CHECK-NOERRNO: declare float @hypotf(float, float) [[NUW]]
401 // CHECK-NOERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NUW]]
402 // CHECK-NOERRNO: declare i32 @ilogb(double) [[NUW]]
403 // CHECK-NOERRNO: declare i32 @ilogbf(float) [[NUW]]
404 // CHECK-NOERRNO: declare i32 @ilogbl(x86_fp80) [[NUW]]
405 // CHECK-NOERRNO: declare double @lgamma(double) [[NUW]]
406 // CHECK-NOERRNO: declare float @lgammaf(float) [[NUW]]
407 // CHECK-NOERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NUW]]
408 // CHECK-NOERRNO: declare i64 @llrint(double) [[NUW]]
409 // CHECK-NOERRNO: declare i64 @llrintf(float) [[NUW]]
410 // CHECK-NOERRNO: declare i64 @llrintl(x86_fp80) [[NUW]]
411 // CHECK-NOERRNO: declare i64 @llround(double) [[NUW]]
412 // CHECK-NOERRNO: declare i64 @llroundf(float) [[NUW]]
413 // CHECK-NOERRNO: declare i64 @llroundl(x86_fp80) [[NUW]]
414 // CHECK-NOERRNO: declare double @log(double) [[NUW]]
415 // CHECK-NOERRNO: declare float @logf(float) [[NUW]]
416 // CHECK-NOERRNO: declare x86_fp80 @logl(x86_fp80) [[NUW]]
417 // CHECK-NOERRNO: declare double @log10(double) [[NUW]]
418 // CHECK-NOERRNO: declare float @log10f(float) [[NUW]]
419 // CHECK-NOERRNO: declare x86_fp80 @log10l(x86_fp80) [[NUW]]
420 // CHECK-NOERRNO: declare double @log1p(double) [[NUW]]
421 // CHECK-NOERRNO: declare float @log1pf(float) [[NUW]]
422 // CHECK-NOERRNO: declare x86_fp80 @log1pl(x86_fp80) [[NUW]]
423 // CHECK-NOERRNO: declare double @log2(double) [[NUW]]
424 // CHECK-NOERRNO: declare float @log2f(float) [[NUW]]
425 // CHECK-NOERRNO: declare x86_fp80 @log2l(x86_fp80) [[NUW]]
426 // CHECK-NOERRNO: declare double @logb(double) [[NUW]]
427 // CHECK-NOERRNO: declare float @logbf(float) [[NUW]]
428 // CHECK-NOERRNO: declare x86_fp80 @logbl(x86_fp80) [[NUW]]
429 // CHECK-NOERRNO: declare i64 @lrint(double) [[NUW]]
430 // CHECK-NOERRNO: declare i64 @lrintf(float) [[NUW]]
431 // CHECK-NOERRNO: declare i64 @lrintl(x86_fp80) [[NUW]]
432 // CHECK-NOERRNO: declare i64 @lround(double) [[NUW]]
433 // CHECK-NOERRNO: declare i64 @lroundf(float) [[NUW]]
434 // CHECK-NOERRNO: declare i64 @lroundl(x86_fp80) [[NUW]]
435 // CHECK-NOERRNO: declare double @nearbyint(double) [[NUW]]
436 // CHECK-NOERRNO: declare float @nearbyintf(float) [[NUW]]
437 // CHECK-NOERRNO: declare x86_fp80 @nearbyintl(x86_fp80) [[NUW]]
438 // CHECK-NOERRNO: declare double @nextafter(double, double) [[NUW]]
439 // CHECK-NOERRNO: declare float @nextafterf(float, float) [[NUW]]
440 // CHECK-NOERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[NUW]]
441 // CHECK-NOERRNO: declare double @nexttoward(double, x86_fp80) [[NUW]]
442 // CHECK-NOERRNO: declare float @nexttowardf(float, x86_fp80) [[NUW]]
443 // CHECK-NOERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[NUW]]
444 // CHECK-NOERRNO: declare double @remainder(double, double) [[NUW]]
445 // CHECK-NOERRNO: declare float @remainderf(float, float) [[NUW]]
446 // CHECK-NOERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[NUW]]
447 // CHECK-NOERRNO: declare double @rint(double) [[NUW]]
448 // CHECK-NOERRNO: declare float @rintf(float) [[NUW]]
449 // CHECK-NOERRNO: declare x86_fp80 @rintl(x86_fp80) [[NUW]]
450 // CHECK-NOERRNO: declare double @round(double) [[NUW]]
451 // CHECK-NOERRNO: declare float @roundf(float) [[NUW]]
452 // CHECK-NOERRNO: declare x86_fp80 @roundl(x86_fp80) [[NUW]]
453 // CHECK-NOERRNO: declare double @scalbln(double, i64) [[NUW]]
454 // CHECK-NOERRNO: declare float @scalblnf(float, i64) [[NUW]]
455 // CHECK-NOERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[NUW]]
456 // CHECK-NOERRNO: declare double @scalbn(double, i32) [[NUW]]
457 // CHECK-NOERRNO: declare float @scalbnf(float, i32) [[NUW]]
458 // CHECK-NOERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[NUW]]
459 // CHECK-NOERRNO: declare double @sin(double) [[NUW]]
460 // CHECK-NOERRNO: declare float @sinf(float) [[NUW]]
461 // CHECK-NOERRNO: declare x86_fp80 @sinl(x86_fp80) [[NUW]]
462 // CHECK-NOERRNO: declare double @sinh(double) [[NUW]]
463 // CHECK-NOERRNO: declare float @sinhf(float) [[NUW]]
464 // CHECK-NOERRNO: declare x86_fp80 @sinhl(x86_fp80) [[NUW]]
465 // CHECK-NOERRNO: declare double @sqrt(double) [[NUW]]
466 // CHECK-NOERRNO: declare float @sqrtf(float) [[NUW]]
467 // CHECK-NOERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW]]
468 // CHECK-NOERRNO: declare double @tan(double) [[NUW]]
469 // CHECK-NOERRNO: declare float @tanf(float) [[NUW]]
470 // CHECK-NOERRNO: declare x86_fp80 @tanl(x86_fp80) [[NUW]]
471 // CHECK-NOERRNO: declare double @tanh(double) [[NUW]]
472 // CHECK-NOERRNO: declare float @tanhf(float) [[NUW]]
473 // CHECK-NOERRNO: declare x86_fp80 @tanhl(x86_fp80) [[NUW]]
474 // CHECK-NOERRNO: declare double @tgamma(double) [[NUW]]
475 // CHECK-NOERRNO: declare float @tgammaf(float) [[NUW]]
476 // CHECK-NOERRNO: declare x86_fp80 @tgammal(x86_fp80) [[NUW]]
477 // CHECK-NOERRNO: declare double @trunc(double) [[NUW]]
478 // CHECK-NOERRNO: declare float @truncf(float) [[NUW]]
479 // CHECK-NOERRNO: declare x86_fp80 @truncl(x86_fp80) [[NUW]]
480 // CHECK-NOERRNO: declare double @cabs(double, double) [[NUW]]
481 // CHECK-NOERRNO: declare float @cabsf(<2 x float>) [[NUW]]
482 // CHECK-NOERRNO: declare { double, double } @cacos(double, double) [[NUW]]
483 // CHECK-NOERRNO: declare <2 x float> @cacosf(<2 x float>) [[NUW]]
484 // CHECK-NOERRNO: declare { double, double } @cacosh(double, double) [[NUW]]
485 // CHECK-NOERRNO: declare <2 x float> @cacoshf(<2 x float>) [[NUW]]
486 // CHECK-NOERRNO: declare double @carg(double, double) [[NUW]]
487 // CHECK-NOERRNO: declare float @cargf(<2 x float>) [[NUW]]
488 // CHECK-NOERRNO: declare { double, double } @casin(double, double) [[NUW]]
489 // CHECK-NOERRNO: declare <2 x float> @casinf(<2 x float>) [[NUW]]
490 // CHECK-NOERRNO: declare { double, double } @casinh(double, double) [[NUW]]
491 // CHECK-NOERRNO: declare <2 x float> @casinhf(<2 x float>) [[NUW]]
492 // CHECK-NOERRNO: declare { double, double } @catan(double, double) [[NUW]]
493 // CHECK-NOERRNO: declare <2 x float> @catanf(<2 x float>) [[NUW]]
494 // CHECK-NOERRNO: declare { double, double } @catanh(double, double) [[NUW]]
495 // CHECK-NOERRNO: declare <2 x float> @catanhf(<2 x float>) [[NUW]]
496 // CHECK-NOERRNO: declare { double, double } @ccos(double, double) [[NUW]]
497 // CHECK-NOERRNO: declare <2 x float> @ccosf(<2 x float>) [[NUW]]
498 // CHECK-NOERRNO: declare { double, double } @ccosh(double, double) [[NUW]]
499 // CHECK-NOERRNO: declare <2 x float> @ccoshf(<2 x float>) [[NUW]]
500 // CHECK-NOERRNO: declare { double, double } @cexp(double, double) [[NUW]]
501 // CHECK-NOERRNO: declare <2 x float> @cexpf(<2 x float>) [[NUW]]
502 // CHECK-NOERRNO: declare double @cimag(double, double) [[NUW]]
503 // CHECK-NOERRNO: declare float @cimagf(<2 x float>) [[NUW]]
504 // CHECK-NOERRNO: declare { double, double } @conj(double, double) [[NUW]]
505 // CHECK-NOERRNO: declare <2 x float> @conjf(<2 x float>) [[NUW]]
506 // CHECK-NOERRNO: declare { double, double } @clog(double, double) [[NUW]]
507 // CHECK-NOERRNO: declare <2 x float> @clogf(<2 x float>) [[NUW]]
508 // CHECK-NOERRNO: declare { double, double } @cproj(double, double) [[NUW]]
509 // CHECK-NOERRNO: declare <2 x float> @cprojf(<2 x float>) [[NUW]]
510 // CHECK-NOERRNO: declare { double, double } @cpow(double, double, double, double) [[NUW]]
511 // CHECK-NOERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[NUW]]
512 // CHECK-NOERRNO: declare double @creal(double, double) [[NUW]]
513 // CHECK-NOERRNO: declare float @crealf(<2 x float>) [[NUW]]
514 // CHECK-NOERRNO: declare { double, double } @csin(double, double) [[NUW]]
515 // CHECK-NOERRNO: declare <2 x float> @csinf(<2 x float>) [[NUW]]
516 // CHECK-NOERRNO: declare { double, double } @csinh(double, double) [[NUW]]
517 // CHECK-NOERRNO: declare <2 x float> @csinhf(<2 x float>) [[NUW]]
518 // CHECK-NOERRNO: declare { double, double } @csqrt(double, double) [[NUW]]
519 // CHECK-NOERRNO: declare <2 x float> @csqrtf(<2 x float>) [[NUW]]
520 // CHECK-NOERRNO: declare { double, double } @ctan(double, double) [[NUW]]
521 // CHECK-NOERRNO: declare <2 x float> @ctanf(<2 x float>) [[NUW]]
522 // CHECK-NOERRNO: declare { double, double } @ctanh(double, double) [[NUW]]
523 // CHECK-NOERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NUW]]
524 // CHECK-NOERRNO: declare double @__sinpi(double) [[NUW]]
525 // CHECK-NOERRNO: declare float @__sinpif(float) [[NUW]]
526 // CHECK-NOERRNO: declare double @__cospi(double) [[NUW]]
527 // CHECK-NOERRNO: declare float @__cospif(float) [[NUW]]
528 // CHECK-NOERRNO: declare double @__tanpi(double) [[NUW]]
529 // CHECK-NOERRNO: declare float @__tanpif(float) [[NUW]]
530 // CHECK-NOERRNO: declare double @__exp10(double) [[NUW]]
531 // CHECK-NOERRNO: declare float @__exp10f(float) [[NUW]]
532 
533 // CHECK-ERRNO: declare i32 @abs(i32) [[NUW:#[0-9]+]]
534 // CHECK-ERRNO: declare i64 @labs(i64) [[NUW]]
535 // CHECK-ERRNO: declare i64 @llabs(i64) [[NUW]]
536 // CHECK-ERRNO: declare double @copysign(double, double) [[NUW]]
537 // CHECK-ERRNO: declare float @copysignf(float, float) [[NUW]]
538 // CHECK-ERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) [[NUW]]
539 // CHECK-ERRNO: declare double @fabs(double) [[NUW]]
540 // CHECK-ERRNO: declare float @fabsf(float) [[NUW]]
541 // CHECK-ERRNO: declare x86_fp80 @fabsl(x86_fp80) [[NUW]]
542 // CHECK-ERRNO: declare double @nan(i8*) [[NUW]]
543 // CHECK-ERRNO: declare float @nanf(i8*) [[NUW]]
544 // CHECK-ERRNO: declare x86_fp80 @nanl(i8*) [[NUW]]
545 // CHECK-ERRNO: declare double @ceil(double) [[NUW]]
546 // CHECK-ERRNO: declare float @ceilf(float) [[NUW]]
547 // CHECK-ERRNO: declare x86_fp80 @ceill(x86_fp80) [[NUW]]
548 // CHECK-ERRNO: declare double @floor(double) [[NUW]]
549 // CHECK-ERRNO: declare float @floorf(float) [[NUW]]
550 // CHECK-ERRNO: declare x86_fp80 @floorl(x86_fp80) [[NUW]]
551 // CHECK-ERRNO: declare double @fmax(double, double) [[NUW]]
552 // CHECK-ERRNO: declare float @fmaxf(float, float) [[NUW]]
553 // CHECK-ERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) [[NUW]]
554 // CHECK-ERRNO: declare double @fmin(double, double) [[NUW]]
555 // CHECK-ERRNO: declare float @fminf(float, float) [[NUW]]
556 // CHECK-ERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) [[NUW]]
557 // CHECK-ERRNO: declare double @nearbyint(double) [[NUW]]
558 // CHECK-ERRNO: declare float @nearbyintf(float) [[NUW]]
559 // CHECK-ERRNO: declare x86_fp80 @nearbyintl(x86_fp80) [[NUW]]
560 // CHECK-ERRNO: declare double @rint(double) [[NUW]]
561 // CHECK-ERRNO: declare float @rintf(float) [[NUW]]
562 // CHECK-ERRNO: declare x86_fp80 @rintl(x86_fp80) [[NUW]]
563 // CHECK-ERRNO: declare double @round(double) [[NUW]]
564 // CHECK-ERRNO: declare float @roundf(float) [[NUW]]
565 // CHECK-ERRNO: declare x86_fp80 @roundl(x86_fp80) [[NUW]]
566 // CHECK-ERRNO: declare double @trunc(double) [[NUW]]
567 // CHECK-ERRNO: declare float @truncf(float) [[NUW]]
568 // CHECK-ERRNO: declare x86_fp80 @truncl(x86_fp80) [[NUW]]
569 // CHECK-ERRNO: declare double @cabs(double, double) [[NUW]]
570 // CHECK-ERRNO: declare float @cabsf(<2 x float>) [[NUW]]
571 // CHECK-ERRNO: declare { double, double } @cacos(double, double) [[NUW]]
572 // CHECK-ERRNO: declare <2 x float> @cacosf(<2 x float>) [[NUW]]
573 // CHECK-ERRNO: declare { double, double } @cacosh(double, double) [[NUW]]
574 // CHECK-ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[NUW]]
575 // CHECK-ERRNO: declare double @carg(double, double) [[NUW]]
576 // CHECK-ERRNO: declare float @cargf(<2 x float>) [[NUW]]
577 // CHECK-ERRNO: declare { double, double } @casin(double, double) [[NUW]]
578 // CHECK-ERRNO: declare <2 x float> @casinf(<2 x float>) [[NUW]]
579 // CHECK-ERRNO: declare { double, double } @casinh(double, double) [[NUW]]
580 // CHECK-ERRNO: declare <2 x float> @casinhf(<2 x float>) [[NUW]]
581 // CHECK-ERRNO: declare { double, double } @catan(double, double) [[NUW]]
582 // CHECK-ERRNO: declare <2 x float> @catanf(<2 x float>) [[NUW]]
583 // CHECK-ERRNO: declare { double, double } @catanh(double, double) [[NUW]]
584 // CHECK-ERRNO: declare <2 x float> @catanhf(<2 x float>) [[NUW]]
585 // CHECK-ERRNO: declare { double, double } @ccos(double, double) [[NUW]]
586 // CHECK-ERRNO: declare <2 x float> @ccosf(<2 x float>) [[NUW]]
587 // CHECK-ERRNO: declare { double, double } @ccosh(double, double) [[NUW]]
588 // CHECK-ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[NUW]]
589 // CHECK-ERRNO: declare { double, double } @cexp(double, double) [[NUW]]
590 // CHECK-ERRNO: declare <2 x float> @cexpf(<2 x float>) [[NUW]]
591 // CHECK-ERRNO: declare double @cimag(double, double) [[NUW]]
592 // CHECK-ERRNO: declare float @cimagf(<2 x float>) [[NUW]]
593 // CHECK-ERRNO: declare { double, double } @conj(double, double) [[NUW]]
594 // CHECK-ERRNO: declare <2 x float> @conjf(<2 x float>) [[NUW]]
595 // CHECK-ERRNO: declare { double, double } @clog(double, double) [[NUW]]
596 // CHECK-ERRNO: declare <2 x float> @clogf(<2 x float>) [[NUW]]
597 // CHECK-ERRNO: declare { double, double } @cproj(double, double) [[NUW]]
598 // CHECK-ERRNO: declare <2 x float> @cprojf(<2 x float>) [[NUW]]
599 // CHECK-ERRNO: declare { double, double } @cpow(double, double, double, double) [[NUW]]
600 // CHECK-ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[NUW]]
601 // CHECK-ERRNO: declare double @creal(double, double) [[NUW]]
602 // CHECK-ERRNO: declare float @crealf(<2 x float>) [[NUW]]
603 // CHECK-ERRNO: declare { double, double } @csin(double, double) [[NUW]]
604 // CHECK-ERRNO: declare <2 x float> @csinf(<2 x float>) [[NUW]]
605 // CHECK-ERRNO: declare { double, double } @csinh(double, double) [[NUW]]
606 // CHECK-ERRNO: declare <2 x float> @csinhf(<2 x float>) [[NUW]]
607 // CHECK-ERRNO: declare { double, double } @csqrt(double, double) [[NUW]]
608 // CHECK-ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[NUW]]
609 // CHECK-ERRNO: declare { double, double } @ctan(double, double) [[NUW]]
610 // CHECK-ERRNO: declare <2 x float> @ctanf(<2 x float>) [[NUW]]
611 // CHECK-ERRNO: declare { double, double } @ctanh(double, double) [[NUW]]
612 // CHECK-ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NUW]]
613 
614 // CHECK-NOERRNO: attributes [[NUW]] = { nounwind readnone{{.*}} }
615 
616 // CHECK-ERRNO: attributes [[NUW]] = { nounwind readnone{{.*}} }
617