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