Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / libcall-declarations.c
blob36c447d20ba7b8f62f7046bb53c165eef985c444
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin12 -o - -emit-llvm %s | FileCheck %s -check-prefix=CHECK-NOERRNO
2 // RUN: %clang_cc1 -triple x86_64 -o - -emit-llvm -fmath-errno %s | FileCheck %s -check-prefix=CHECK-ERRNO
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin12 -o - -emit-llvm -x c++ %s | FileCheck %s -check-prefix=CHECK-NOERRNO
4 // RUN: %clang_cc1 -triple x86_64 -o - -emit-llvm -x c++ -fmath-errno %s | FileCheck %s -check-prefix=CHECK-ERRNO
6 // Prototypes.
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 double atan2(double noundef, 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 noundef, 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 noundef, double);
23 float fmodf(float, float);
24 long double fmodl(long double, long double);
25 double frexp(double noundef, int *);
26 float frexpf(float, int *);
27 long double frexpl(long double noundef, int *);
28 double ldexp(double noundef, int);
29 float ldexpf(float, int);
30 long double ldexpl(long double noundef, int);
31 double modf(double noundef, 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 noundef, 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 noundef, 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 noundef, double, double);
92 float fmaf(float, float, float);
93 long double fmal(long double, long double, long double);
94 double fmax(double noundef, double);
95 float fmaxf(float, float);
96 long double fmaxl(long double, long double);
97 double fmin(double noundef, double);
98 float fminf(float, float);
99 long double fminl(long double, long double);
100 double hypot(double noundef, 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 noundef, 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 noundef, 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 noundef, int exp);
158 float scalbnf(float, int exp);
159 long double scalbnl(long double noundef, 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);
248 double __sinpi(double);
249 float __sinpif(float);
250 double __cospi(double);
251 float __cospif(float);
252 double __tanpi(double);
253 float __tanpif(float);
255 double __exp10(double);
256 float __exp10f(float);
257 #ifdef __cplusplus
259 #endif
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)
315 // CHECK-NOERRNO: declare double @atan2(double noundef, double noundef) [[NUWRN:#[0-9]+]]
316 // CHECK-NOERRNO: declare float @atan2f(float noundef, float noundef) [[NUWRN]]
317 // CHECK-NOERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
318 // CHECK-NOERRNO: declare i32 @abs(i32 noundef) [[NUWRN]]
319 // CHECK-NOERRNO: declare i64 @labs(i64 noundef) [[NUWRN]]
320 // CHECK-NOERRNO: declare i64 @llabs(i64 noundef) [[NUWRN]]
321 // CHECK-NOERRNO: declare double @copysign(double noundef, double noundef) [[NUWRN]]
322 // CHECK-NOERRNO: declare float @copysignf(float noundef, float noundef) [[NUWRN]]
323 // CHECK-NOERRNO: declare x86_fp80 @copysignl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
324 // CHECK-NOERRNO: declare double @fabs(double noundef) [[NUWRN]]
325 // CHECK-NOERRNO: declare float @fabsf(float noundef) [[NUWRN]]
326 // CHECK-NOERRNO: declare x86_fp80 @fabsl(x86_fp80 noundef) [[NUWRN]]
327 // CHECK-NOERRNO: declare double @fmod(double noundef, double noundef) [[NUWRN]]
328 // CHECK-NOERRNO: declare float @fmodf(float noundef, float noundef) [[NUWRN]]
329 // CHECK-NOERRNO: declare x86_fp80 @fmodl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
330 // CHECK-NOERRNO: declare double @ldexp(double noundef, i32 noundef) [[NUWRN]]
331 // CHECK-NOERRNO: declare float @ldexpf(float noundef, i32 noundef) [[NUWRN]]
332 // CHECK-NOERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[NUWRN]]
333 // CHECK-NOERRNO: declare double @nan(ptr noundef) [[NUWRO:#[0-9]+]]
334 // CHECK-NOERRNO: declare float @nanf(ptr noundef) [[NUWRO]]
335 // CHECK-NOERRNO: declare x86_fp80 @nanl(ptr noundef) [[NUWRO]]
336 // CHECK-NOERRNO: declare double @pow(double noundef, double noundef) [[NUWRN]]
337 // CHECK-NOERRNO: declare float @powf(float noundef, float noundef) [[NUWRN]]
338 // CHECK-NOERRNO: declare x86_fp80 @powl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
339 // CHECK-NOERRNO: declare double @acos(double noundef) [[NUWRN]]
340 // CHECK-NOERRNO: declare float @acosf(float noundef) [[NUWRN]]
341 // CHECK-NOERRNO: declare x86_fp80 @acosl(x86_fp80 noundef) [[NUWRN]]
342 // CHECK-NOERRNO: declare double @acosh(double noundef) [[NUWRN]]
343 // CHECK-NOERRNO: declare float @acoshf(float noundef) [[NUWRN]]
344 // CHECK-NOERRNO: declare x86_fp80 @acoshl(x86_fp80 noundef) [[NUWRN]]
345 // CHECK-NOERRNO: declare double @asin(double noundef) [[NUWRN]]
346 // CHECK-NOERRNO: declare float @asinf(float noundef) [[NUWRN]]
347 // CHECK-NOERRNO: declare x86_fp80 @asinl(x86_fp80 noundef) [[NUWRN]]
348 // CHECK-NOERRNO: declare double @asinh(double noundef) [[NUWRN]]
349 // CHECK-NOERRNO: declare float @asinhf(float noundef) [[NUWRN]]
350 // CHECK-NOERRNO: declare x86_fp80 @asinhl(x86_fp80 noundef) [[NUWRN]]
351 // CHECK-NOERRNO: declare double @atan(double noundef) [[NUWRN]]
352 // CHECK-NOERRNO: declare float @atanf(float noundef) [[NUWRN]]
353 // CHECK-NOERRNO: declare x86_fp80 @atanl(x86_fp80 noundef) [[NUWRN]]
354 // CHECK-NOERRNO: declare double @atanh(double noundef) [[NUWRN]]
355 // CHECK-NOERRNO: declare float @atanhf(float noundef) [[NUWRN]]
356 // CHECK-NOERRNO: declare x86_fp80 @atanhl(x86_fp80 noundef) [[NUWRN]]
357 // CHECK-NOERRNO: declare double @cbrt(double noundef) [[NUWRN]]
358 // CHECK-NOERRNO: declare float @cbrtf(float noundef) [[NUWRN]]
359 // CHECK-NOERRNO: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[NUWRN]]
360 // CHECK-NOERRNO: declare double @ceil(double noundef) [[NUWRN]]
361 // CHECK-NOERRNO: declare float @ceilf(float noundef) [[NUWRN]]
362 // CHECK-NOERRNO: declare x86_fp80 @ceill(x86_fp80 noundef) [[NUWRN]]
363 // CHECK-NOERRNO: declare double @cos(double noundef) [[NUWRN]]
364 // CHECK-NOERRNO: declare float @cosf(float noundef) [[NUWRN]]
365 // CHECK-NOERRNO: declare x86_fp80 @cosl(x86_fp80 noundef) [[NUWRN]]
366 // CHECK-NOERRNO: declare double @cosh(double noundef) [[NUWRN]]
367 // CHECK-NOERRNO: declare float @coshf(float noundef) [[NUWRN]]
368 // CHECK-NOERRNO: declare x86_fp80 @coshl(x86_fp80 noundef) [[NUWRN]]
369 // CHECK-NOERRNO: declare double @erf(double noundef) [[NUWRN]]
370 // CHECK-NOERRNO: declare float @erff(float noundef) [[NUWRN]]
371 // CHECK-NOERRNO: declare x86_fp80 @erfl(x86_fp80 noundef) [[NUWRN]]
372 // CHECK-NOERRNO: declare double @erfc(double noundef) [[NUWRN]]
373 // CHECK-NOERRNO: declare float @erfcf(float noundef) [[NUWRN]]
374 // CHECK-NOERRNO: declare x86_fp80 @erfcl(x86_fp80 noundef) [[NUWRN]]
375 // CHECK-NOERRNO: declare double @exp(double noundef) [[NUWRN]]
376 // CHECK-NOERRNO: declare float @expf(float noundef) [[NUWRN]]
377 // CHECK-NOERRNO: declare x86_fp80 @expl(x86_fp80 noundef) [[NUWRN]]
378 // CHECK-NOERRNO: declare double @exp2(double noundef) [[NUWRN]]
379 // CHECK-NOERRNO: declare float @exp2f(float noundef) [[NUWRN]]
380 // CHECK-NOERRNO: declare x86_fp80 @exp2l(x86_fp80 noundef) [[NUWRN]]
381 // CHECK-NOERRNO: declare double @expm1(double noundef) [[NUWRN]]
382 // CHECK-NOERRNO: declare float @expm1f(float noundef) [[NUWRN]]
383 // CHECK-NOERRNO: declare x86_fp80 @expm1l(x86_fp80 noundef) [[NUWRN]]
384 // CHECK-NOERRNO: declare double @fdim(double noundef, double noundef) [[NUWRN]]
385 // CHECK-NOERRNO: declare float @fdimf(float noundef, float noundef) [[NUWRN]]
386 // CHECK-NOERRNO: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
387 // CHECK-NOERRNO: declare double @floor(double noundef) [[NUWRN]]
388 // CHECK-NOERRNO: declare float @floorf(float noundef) [[NUWRN]]
389 // CHECK-NOERRNO: declare x86_fp80 @floorl(x86_fp80 noundef) [[NUWRN]]
390 // CHECK-NOERRNO: declare double @fma(double noundef, double noundef, double noundef) [[NUWRN]]
391 // CHECK-NOERRNO: declare float @fmaf(float noundef, float noundef, float noundef) [[NUWRN]]
392 // CHECK-NOERRNO: declare x86_fp80 @fmal(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
393 // CHECK-NOERRNO: declare double @fmax(double noundef, double noundef) [[NUWRN]]
394 // CHECK-NOERRNO: declare float @fmaxf(float noundef, float noundef) [[NUWRN]]
395 // CHECK-NOERRNO: declare x86_fp80 @fmaxl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
396 // CHECK-NOERRNO: declare double @fmin(double noundef, double noundef) [[NUWRN]]
397 // CHECK-NOERRNO: declare float @fminf(float noundef, float noundef) [[NUWRN]]
398 // CHECK-NOERRNO: declare x86_fp80 @fminl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
399 // CHECK-NOERRNO: declare double @hypot(double noundef, double noundef) [[NUWRN]]
400 // CHECK-NOERRNO: declare float @hypotf(float noundef, float noundef) [[NUWRN]]
401 // CHECK-NOERRNO: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
402 // CHECK-NOERRNO: declare i32 @ilogb(double noundef) [[NUWRN]]
403 // CHECK-NOERRNO: declare i32 @ilogbf(float noundef) [[NUWRN]]
404 // CHECK-NOERRNO: declare i32 @ilogbl(x86_fp80 noundef) [[NUWRN]]
405 // CHECK-NOERRNO: declare double @lgamma(double noundef) [[NONCONST:#[0-9]+]]
406 // CHECK-NOERRNO: declare float @lgammaf(float noundef) [[NONCONST]]
407 // CHECK-NOERRNO: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NONCONST]]
408 // CHECK-NOERRNO: declare i64 @llrint(double noundef) [[NUWRN]]
409 // CHECK-NOERRNO: declare i64 @llrintf(float noundef) [[NUWRN]]
410 // CHECK-NOERRNO: declare i64 @llrintl(x86_fp80 noundef) [[NUWRN]]
411 // CHECK-NOERRNO: declare i64 @llround(double noundef) [[NUWRN]]
412 // CHECK-NOERRNO: declare i64 @llroundf(float noundef) [[NUWRN]]
413 // CHECK-NOERRNO: declare i64 @llroundl(x86_fp80 noundef) [[NUWRN]]
414 // CHECK-NOERRNO: declare double @log(double noundef) [[NUWRN]]
415 // CHECK-NOERRNO: declare float @logf(float noundef) [[NUWRN]]
416 // CHECK-NOERRNO: declare x86_fp80 @logl(x86_fp80 noundef) [[NUWRN]]
417 // CHECK-NOERRNO: declare double @log10(double noundef) [[NUWRN]]
418 // CHECK-NOERRNO: declare float @log10f(float noundef) [[NUWRN]]
419 // CHECK-NOERRNO: declare x86_fp80 @log10l(x86_fp80 noundef) [[NUWRN]]
420 // CHECK-NOERRNO: declare double @log1p(double noundef) [[NUWRN]]
421 // CHECK-NOERRNO: declare float @log1pf(float noundef) [[NUWRN]]
422 // CHECK-NOERRNO: declare x86_fp80 @log1pl(x86_fp80 noundef) [[NUWRN]]
423 // CHECK-NOERRNO: declare double @log2(double noundef) [[NUWRN]]
424 // CHECK-NOERRNO: declare float @log2f(float noundef) [[NUWRN]]
425 // CHECK-NOERRNO: declare x86_fp80 @log2l(x86_fp80 noundef) [[NUWRN]]
426 // CHECK-NOERRNO: declare double @logb(double noundef) [[NUWRN]]
427 // CHECK-NOERRNO: declare float @logbf(float noundef) [[NUWRN]]
428 // CHECK-NOERRNO: declare x86_fp80 @logbl(x86_fp80 noundef) [[NUWRN]]
429 // CHECK-NOERRNO: declare i64 @lrint(double noundef) [[NUWRN]]
430 // CHECK-NOERRNO: declare i64 @lrintf(float noundef) [[NUWRN]]
431 // CHECK-NOERRNO: declare i64 @lrintl(x86_fp80 noundef) [[NUWRN]]
432 // CHECK-NOERRNO: declare i64 @lround(double noundef) [[NUWRN]]
433 // CHECK-NOERRNO: declare i64 @lroundf(float noundef) [[NUWRN]]
434 // CHECK-NOERRNO: declare i64 @lroundl(x86_fp80 noundef) [[NUWRN]]
435 // CHECK-NOERRNO: declare double @nearbyint(double noundef) [[NUWRN]]
436 // CHECK-NOERRNO: declare float @nearbyintf(float noundef) [[NUWRN]]
437 // CHECK-NOERRNO: declare x86_fp80 @nearbyintl(x86_fp80 noundef) [[NUWRN]]
438 // CHECK-NOERRNO: declare double @nextafter(double noundef, double noundef) [[NUWRN]]
439 // CHECK-NOERRNO: declare float @nextafterf(float noundef, float noundef) [[NUWRN]]
440 // CHECK-NOERRNO: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
441 // CHECK-NOERRNO: declare double @nexttoward(double noundef, x86_fp80 noundef) [[NUWRN]]
442 // CHECK-NOERRNO: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[NUWRN]]
443 // CHECK-NOERRNO: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
444 // CHECK-NOERRNO: declare double @remainder(double noundef, double noundef) [[NUWRN]]
445 // CHECK-NOERRNO: declare float @remainderf(float noundef, float noundef) [[NUWRN]]
446 // CHECK-NOERRNO: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
447 // CHECK-NOERRNO: declare double @rint(double noundef) [[NUWRN]]
448 // CHECK-NOERRNO: declare float @rintf(float noundef) [[NUWRN]]
449 // CHECK-NOERRNO: declare x86_fp80 @rintl(x86_fp80 noundef) [[NUWRN]]
450 // CHECK-NOERRNO: declare double @round(double noundef) [[NUWRN]]
451 // CHECK-NOERRNO: declare float @roundf(float noundef) [[NUWRN]]
452 // CHECK-NOERRNO: declare x86_fp80 @roundl(x86_fp80 noundef) [[NUWRN]]
453 // CHECK-NOERRNO: declare double @scalbln(double noundef, i64 noundef) [[NUWRN]]
454 // CHECK-NOERRNO: declare float @scalblnf(float noundef, i64 noundef) [[NUWRN]]
455 // CHECK-NOERRNO: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[NUWRN]]
456 // CHECK-NOERRNO: declare double @scalbn(double noundef, i32 noundef) [[NUWRN]]
457 // CHECK-NOERRNO: declare float @scalbnf(float noundef, i32 noundef) [[NUWRN]]
458 // CHECK-NOERRNO: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[NUWRN]]
459 // CHECK-NOERRNO: declare double @sin(double noundef) [[NUWRN]]
460 // CHECK-NOERRNO: declare float @sinf(float noundef) [[NUWRN]]
461 // CHECK-NOERRNO: declare x86_fp80 @sinl(x86_fp80 noundef) [[NUWRN]]
462 // CHECK-NOERRNO: declare double @sinh(double noundef) [[NUWRN]]
463 // CHECK-NOERRNO: declare float @sinhf(float noundef) [[NUWRN]]
464 // CHECK-NOERRNO: declare x86_fp80 @sinhl(x86_fp80 noundef) [[NUWRN]]
465 // CHECK-NOERRNO: declare double @sqrt(double noundef) [[NUWRN]]
466 // CHECK-NOERRNO: declare float @sqrtf(float noundef) [[NUWRN]]
467 // CHECK-NOERRNO: declare x86_fp80 @sqrtl(x86_fp80 noundef) [[NUWRN]]
468 // CHECK-NOERRNO: declare double @tan(double noundef) [[NUWRN]]
469 // CHECK-NOERRNO: declare float @tanf(float noundef) [[NUWRN]]
470 // CHECK-NOERRNO: declare x86_fp80 @tanl(x86_fp80 noundef) [[NUWRN]]
471 // CHECK-NOERRNO: declare double @tanh(double noundef) [[NUWRN]]
472 // CHECK-NOERRNO: declare float @tanhf(float noundef) [[NUWRN]]
473 // CHECK-NOERRNO: declare x86_fp80 @tanhl(x86_fp80 noundef) [[NUWRN]]
474 // CHECK-NOERRNO: declare double @tgamma(double noundef) [[NUWRN]]
475 // CHECK-NOERRNO: declare float @tgammaf(float noundef) [[NUWRN]]
476 // CHECK-NOERRNO: declare x86_fp80 @tgammal(x86_fp80 noundef) [[NUWRN]]
477 // CHECK-NOERRNO: declare double @trunc(double noundef) [[NUWRN]]
478 // CHECK-NOERRNO: declare float @truncf(float noundef) [[NUWRN]]
479 // CHECK-NOERRNO: declare x86_fp80 @truncl(x86_fp80 noundef) [[NUWRN]]
480 // CHECK-NOERRNO: declare double @cabs(double noundef, double noundef) [[NUWRN]]
481 // CHECK-NOERRNO: declare float @cabsf(<2 x float> noundef) [[NUWRN]]
482 // CHECK-NOERRNO: declare { double, double } @cacos(double noundef, double noundef) [[NUWRN]]
483 // CHECK-NOERRNO: declare <2 x float> @cacosf(<2 x float> noundef) [[NUWRN]]
484 // CHECK-NOERRNO: declare { double, double } @cacosh(double noundef, double noundef) [[NUWRN]]
485 // CHECK-NOERRNO: declare <2 x float> @cacoshf(<2 x float> noundef) [[NUWRN]]
486 // CHECK-NOERRNO: declare double @carg(double noundef, double noundef) [[NUWRN]]
487 // CHECK-NOERRNO: declare float @cargf(<2 x float> noundef) [[NUWRN]]
488 // CHECK-NOERRNO: declare { double, double } @casin(double noundef, double noundef) [[NUWRN]]
489 // CHECK-NOERRNO: declare <2 x float> @casinf(<2 x float> noundef) [[NUWRN]]
490 // CHECK-NOERRNO: declare { double, double } @casinh(double noundef, double noundef) [[NUWRN]]
491 // CHECK-NOERRNO: declare <2 x float> @casinhf(<2 x float> noundef) [[NUWRN]]
492 // CHECK-NOERRNO: declare { double, double } @catan(double noundef, double noundef) [[NUWRN]]
493 // CHECK-NOERRNO: declare <2 x float> @catanf(<2 x float> noundef) [[NUWRN]]
494 // CHECK-NOERRNO: declare { double, double } @catanh(double noundef, double noundef) [[NUWRN]]
495 // CHECK-NOERRNO: declare <2 x float> @catanhf(<2 x float> noundef) [[NUWRN]]
496 // CHECK-NOERRNO: declare { double, double } @ccos(double noundef, double noundef) [[NUWRN]]
497 // CHECK-NOERRNO: declare <2 x float> @ccosf(<2 x float> noundef) [[NUWRN]]
498 // CHECK-NOERRNO: declare { double, double } @ccosh(double noundef, double noundef) [[NUWRN]]
499 // CHECK-NOERRNO: declare <2 x float> @ccoshf(<2 x float> noundef) [[NUWRN]]
500 // CHECK-NOERRNO: declare { double, double } @cexp(double noundef, double noundef) [[NUWRN]]
501 // CHECK-NOERRNO: declare <2 x float> @cexpf(<2 x float> noundef) [[NUWRN]]
502 // CHECK-NOERRNO: declare double @cimag(double noundef, double noundef) [[NUWRN]]
503 // CHECK-NOERRNO: declare float @cimagf(<2 x float> noundef) [[NUWRN]]
504 // CHECK-NOERRNO: declare { double, double } @conj(double noundef, double noundef) [[NUWRN]]
505 // CHECK-NOERRNO: declare <2 x float> @conjf(<2 x float> noundef) [[NUWRN]]
506 // CHECK-NOERRNO: declare { double, double } @clog(double noundef, double noundef) [[NUWRN]]
507 // CHECK-NOERRNO: declare <2 x float> @clogf(<2 x float> noundef) [[NUWRN]]
508 // CHECK-NOERRNO: declare { double, double } @cproj(double noundef, double noundef) [[NUWRN]]
509 // CHECK-NOERRNO: declare <2 x float> @cprojf(<2 x float> noundef) [[NUWRN]]
510 // CHECK-NOERRNO: declare { double, double } @cpow(double noundef, double noundef, double noundef, double noundef) [[NUWRN]]
511 // CHECK-NOERRNO: declare <2 x float> @cpowf(<2 x float> noundef, <2 x float> noundef) [[NUWRN]]
512 // CHECK-NOERRNO: declare double @creal(double noundef, double noundef) [[NUWRN]]
513 // CHECK-NOERRNO: declare float @crealf(<2 x float> noundef) [[NUWRN]]
514 // CHECK-NOERRNO: declare { double, double } @csin(double noundef, double noundef) [[NUWRN]]
515 // CHECK-NOERRNO: declare <2 x float> @csinf(<2 x float> noundef) [[NUWRN]]
516 // CHECK-NOERRNO: declare { double, double } @csinh(double noundef, double noundef) [[NUWRN]]
517 // CHECK-NOERRNO: declare <2 x float> @csinhf(<2 x float> noundef) [[NUWRN]]
518 // CHECK-NOERRNO: declare { double, double } @csqrt(double noundef, double noundef) [[NUWRN]]
519 // CHECK-NOERRNO: declare <2 x float> @csqrtf(<2 x float> noundef) [[NUWRN]]
520 // CHECK-NOERRNO: declare { double, double } @ctan(double noundef, double noundef) [[NUWRN]]
521 // CHECK-NOERRNO: declare <2 x float> @ctanf(<2 x float> noundef) [[NUWRN]]
522 // CHECK-NOERRNO: declare { double, double } @ctanh(double noundef, double noundef) [[NUWRN]]
523 // CHECK-NOERRNO: declare <2 x float> @ctanhf(<2 x float> noundef) [[NUWRN]]
524 // CHECK-NOERRNO: declare double @__sinpi(double noundef) [[NUWRN]]
525 // CHECK-NOERRNO: declare float @__sinpif(float noundef) [[NUWRN]]
526 // CHECK-NOERRNO: declare double @__cospi(double noundef) [[NUWRN]]
527 // CHECK-NOERRNO: declare float @__cospif(float noundef) [[NUWRN]]
528 // CHECK-NOERRNO: declare double @__tanpi(double noundef) [[NUWRN]]
529 // CHECK-NOERRNO: declare float @__tanpif(float noundef) [[NUWRN]]
530 // CHECK-NOERRNO: declare double @__exp10(double noundef) [[NUWRN]]
531 // CHECK-NOERRNO: declare float @__exp10f(float noundef) [[NUWRN]]
533 // CHECK-ERRNO: declare i32 @abs(i32 noundef) [[NUWRN:#[0-9]+]]
534 // CHECK-ERRNO: declare i64 @labs(i64 noundef) [[NUWRN]]
535 // CHECK-ERRNO: declare i64 @llabs(i64 noundef) [[NUWRN]]
536 // CHECK-ERRNO: declare double @copysign(double noundef, double noundef) [[NUWRN]]
537 // CHECK-ERRNO: declare float @copysignf(float noundef, float noundef) [[NUWRN]]
538 // CHECK-ERRNO: declare x86_fp80 @copysignl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
539 // CHECK-ERRNO: declare double @fabs(double noundef) [[NUWRN]]
540 // CHECK-ERRNO: declare float @fabsf(float noundef) [[NUWRN]]
541 // CHECK-ERRNO: declare x86_fp80 @fabsl(x86_fp80 noundef) [[NUWRN]]
542 // CHECK-ERRNO: declare double @nan(ptr noundef) [[NUWRO:#[0-9]+]]
543 // CHECK-ERRNO: declare float @nanf(ptr noundef) [[NUWRO]]
544 // CHECK-ERRNO: declare x86_fp80 @nanl(ptr noundef) [[NUWRO]]
545 // CHECK-ERRNO: declare double @ceil(double noundef) [[NUWRN]]
546 // CHECK-ERRNO: declare float @ceilf(float noundef) [[NUWRN]]
547 // CHECK-ERRNO: declare x86_fp80 @ceill(x86_fp80 noundef) [[NUWRN]]
548 // CHECK-ERRNO: declare double @floor(double noundef) [[NUWRN]]
549 // CHECK-ERRNO: declare float @floorf(float noundef) [[NUWRN]]
550 // CHECK-ERRNO: declare x86_fp80 @floorl(x86_fp80 noundef) [[NUWRN]]
551 // CHECK-ERRNO: declare double @fmax(double noundef, double noundef) [[NUWRN]]
552 // CHECK-ERRNO: declare float @fmaxf(float noundef, float noundef) [[NUWRN]]
553 // CHECK-ERRNO: declare x86_fp80 @fmaxl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
554 // CHECK-ERRNO: declare double @fmin(double noundef, double noundef) [[NUWRN]]
555 // CHECK-ERRNO: declare float @fminf(float noundef, float noundef) [[NUWRN]]
556 // CHECK-ERRNO: declare x86_fp80 @fminl(x86_fp80 noundef, x86_fp80 noundef) [[NUWRN]]
557 // CHECK-ERRNO: declare double @lgamma(double noundef) [[NONCONST:#[0-9]+]]
558 // CHECK-ERRNO: declare float @lgammaf(float noundef) [[NONCONST]]
559 // CHECK-ERRNO: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NONCONST]]
560 // CHECK-ERRNO: declare double @nearbyint(double noundef) [[NUWRN]]
561 // CHECK-ERRNO: declare float @nearbyintf(float noundef) [[NUWRN]]
562 // CHECK-ERRNO: declare x86_fp80 @nearbyintl(x86_fp80 noundef) [[NUWRN]]
563 // CHECK-ERRNO: declare double @rint(double noundef) [[NUWRN]]
564 // CHECK-ERRNO: declare float @rintf(float noundef) [[NUWRN]]
565 // CHECK-ERRNO: declare x86_fp80 @rintl(x86_fp80 noundef) [[NUWRN]]
566 // CHECK-ERRNO: declare double @round(double noundef) [[NUWRN]]
567 // CHECK-ERRNO: declare float @roundf(float noundef) [[NUWRN]]
568 // CHECK-ERRNO: declare x86_fp80 @roundl(x86_fp80 noundef) [[NUWRN]]
569 // CHECK-ERRNO: declare double @trunc(double noundef) [[NUWRN]]
570 // CHECK-ERRNO: declare float @truncf(float noundef) [[NUWRN]]
571 // CHECK-ERRNO: declare x86_fp80 @truncl(x86_fp80 noundef) [[NUWRN]]
572 // CHECK-ERRNO: declare double @cabs(double noundef, double noundef) [[NONCONST]]
573 // CHECK-ERRNO: declare float @cabsf(<2 x float> noundef) [[NONCONST]]
574 // CHECK-ERRNO: declare { double, double } @cacos(double noundef, double noundef) [[NONCONST]]
575 // CHECK-ERRNO: declare <2 x float> @cacosf(<2 x float> noundef) [[NONCONST]]
576 // CHECK-ERRNO: declare { double, double } @cacosh(double noundef, double noundef) [[NONCONST]]
577 // CHECK-ERRNO: declare <2 x float> @cacoshf(<2 x float> noundef) [[NONCONST]]
578 // CHECK-ERRNO: declare double @carg(double noundef, double noundef) [[NONCONST]]
579 // CHECK-ERRNO: declare float @cargf(<2 x float> noundef) [[NONCONST]]
580 // CHECK-ERRNO: declare { double, double } @casin(double noundef, double noundef) [[NONCONST]]
581 // CHECK-ERRNO: declare <2 x float> @casinf(<2 x float> noundef) [[NONCONST]]
582 // CHECK-ERRNO: declare { double, double } @casinh(double noundef, double noundef) [[NONCONST]]
583 // CHECK-ERRNO: declare <2 x float> @casinhf(<2 x float> noundef) [[NONCONST]]
584 // CHECK-ERRNO: declare { double, double } @catan(double noundef, double noundef) [[NONCONST]]
585 // CHECK-ERRNO: declare <2 x float> @catanf(<2 x float> noundef) [[NONCONST]]
586 // CHECK-ERRNO: declare { double, double } @catanh(double noundef, double noundef) [[NONCONST]]
587 // CHECK-ERRNO: declare <2 x float> @catanhf(<2 x float> noundef) [[NONCONST]]
588 // CHECK-ERRNO: declare { double, double } @ccos(double noundef, double noundef) [[NONCONST]]
589 // CHECK-ERRNO: declare <2 x float> @ccosf(<2 x float> noundef) [[NONCONST]]
590 // CHECK-ERRNO: declare { double, double } @ccosh(double noundef, double noundef) [[NONCONST]]
591 // CHECK-ERRNO: declare <2 x float> @ccoshf(<2 x float> noundef) [[NONCONST]]
592 // CHECK-ERRNO: declare { double, double } @cexp(double noundef, double noundef) [[NONCONST]]
593 // CHECK-ERRNO: declare <2 x float> @cexpf(<2 x float> noundef) [[NONCONST]]
594 // CHECK-ERRNO: declare double @cimag(double noundef, double noundef) [[NUWRN]]
595 // CHECK-ERRNO: declare float @cimagf(<2 x float> noundef) [[NUWRN]]
596 // CHECK-ERRNO: declare { double, double } @conj(double noundef, double noundef) [[NUWRN]]
597 // CHECK-ERRNO: declare <2 x float> @conjf(<2 x float> noundef) [[NUWRN]]
598 // CHECK-ERRNO: declare { double, double } @clog(double noundef, double noundef) [[NONCONST]]
599 // CHECK-ERRNO: declare <2 x float> @clogf(<2 x float> noundef) [[NONCONST]]
600 // CHECK-ERRNO: declare { double, double } @cproj(double noundef, double noundef) [[NUWRN]]
601 // CHECK-ERRNO: declare <2 x float> @cprojf(<2 x float> noundef) [[NUWRN]]
602 // CHECK-ERRNO: declare { double, double } @cpow(double noundef, double noundef, double noundef, double noundef) [[NONCONST]]
603 // CHECK-ERRNO: declare <2 x float> @cpowf(<2 x float> noundef, <2 x float> noundef) [[NONCONST]]
604 // CHECK-ERRNO: declare double @creal(double noundef, double noundef) [[NUWRN]]
605 // CHECK-ERRNO: declare float @crealf(<2 x float> noundef) [[NUWRN]]
606 // CHECK-ERRNO: declare { double, double } @csin(double noundef, double noundef) [[NONCONST]]
607 // CHECK-ERRNO: declare <2 x float> @csinf(<2 x float> noundef) [[NONCONST]]
608 // CHECK-ERRNO: declare { double, double } @csinh(double noundef, double noundef) [[NONCONST]]
609 // CHECK-ERRNO: declare <2 x float> @csinhf(<2 x float> noundef) [[NONCONST]]
610 // CHECK-ERRNO: declare { double, double } @csqrt(double noundef, double noundef) [[NONCONST]]
611 // CHECK-ERRNO: declare <2 x float> @csqrtf(<2 x float> noundef) [[NONCONST]]
612 // CHECK-ERRNO: declare { double, double } @ctan(double noundef, double noundef) [[NONCONST]]
613 // CHECK-ERRNO: declare <2 x float> @ctanf(<2 x float> noundef) [[NONCONST]]
614 // CHECK-ERRNO: declare { double, double } @ctanh(double noundef, double noundef) [[NONCONST]]
615 // CHECK-ERRNO: declare <2 x float> @ctanhf(<2 x float> noundef) [[NONCONST]]
617 // CHECK-NOERRNO: attributes [[NUWRN]] = { nounwind willreturn memory(none){{.*}} }
618 // CHECK-NOERRNO: attributes [[NUWRO]] = { nounwind willreturn memory(read){{.*}} }
620 // CHECK-ERRNO: attributes [[NUWRN]] = { nounwind willreturn memory(none){{.*}} }
621 // CHECK-ERRNO: attributes [[NUWRO]] = { nounwind willreturn memory(read){{.*}} }