blob: 7813dc1cc25e467bd3c9d9e0906235b505b61beb [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
Sanjay Patelc9197582017-11-04 15:03:11 +0000421 remquo(f,f,i); remquof(f,f,i); remquol(f,f,i);
422
423// NO__ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
424// NO__ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
425// NO__ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
426// HAS_ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
427// HAS_ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
428// HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
Sanjay Patel594d2172017-11-03 16:27:27 +0000429
430 rint(f); rintf(f); rintl(f);
431
432// NO__ERRNO: declare double @rint(double) [[READNONE]]
433// NO__ERRNO: declare float @rintf(float) [[READNONE]]
434// NO__ERRNO: declare x86_fp80 @rintl(x86_fp80) [[READNONE]]
435// HAS_ERRNO: declare double @rint(double) [[READNONE]]
436// HAS_ERRNO: declare float @rintf(float) [[READNONE]]
437// HAS_ERRNO: declare x86_fp80 @rintl(x86_fp80) [[READNONE]]
438
439 round(f); roundf(f); roundl(f);
440
441// NO__ERRNO: declare double @round(double) [[READNONE]]
442// NO__ERRNO: declare float @roundf(float) [[READNONE]]
443// NO__ERRNO: declare x86_fp80 @roundl(x86_fp80) [[READNONE]]
444// HAS_ERRNO: declare double @round(double) [[READNONE]]
445// HAS_ERRNO: declare float @roundf(float) [[READNONE]]
446// HAS_ERRNO: declare x86_fp80 @roundl(x86_fp80) [[READNONE]]
447
448 scalbln(f,f); scalblnf(f,f); scalblnl(f,f);
449
450// NO__ERRNO: declare double @scalbln(double, i64) [[READNONE]]
451// NO__ERRNO: declare float @scalblnf(float, i64) [[READNONE]]
452// NO__ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[READNONE]]
453// HAS_ERRNO: declare double @scalbln(double, i64) [[NOT_READNONE]]
454// HAS_ERRNO: declare float @scalblnf(float, i64) [[NOT_READNONE]]
455// HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[NOT_READNONE]]
456
457 scalbn(f,f); scalbnf(f,f); scalbnl(f,f);
458
459// NO__ERRNO: declare double @scalbn(double, i32) [[READNONE]]
460// NO__ERRNO: declare float @scalbnf(float, i32) [[READNONE]]
461// NO__ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[READNONE]]
462// HAS_ERRNO: declare double @scalbn(double, i32) [[NOT_READNONE]]
463// HAS_ERRNO: declare float @scalbnf(float, i32) [[NOT_READNONE]]
464// HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[NOT_READNONE]]
465
466 sin(f); sinf(f); sinl(f);
467
468// NO__ERRNO: declare double @sin(double) [[READNONE]]
469// NO__ERRNO: declare float @sinf(float) [[READNONE]]
470// NO__ERRNO: declare x86_fp80 @sinl(x86_fp80) [[READNONE]]
471// HAS_ERRNO: declare double @sin(double) [[NOT_READNONE]]
472// HAS_ERRNO: declare float @sinf(float) [[NOT_READNONE]]
473// HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[NOT_READNONE]]
474
475 sinh(f); sinhf(f); sinhl(f);
476
477// NO__ERRNO: declare double @sinh(double) [[READNONE]]
478// NO__ERRNO: declare float @sinhf(float) [[READNONE]]
479// NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[READNONE]]
480// HAS_ERRNO: declare double @sinh(double) [[NOT_READNONE]]
481// HAS_ERRNO: declare float @sinhf(float) [[NOT_READNONE]]
482// HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[NOT_READNONE]]
483
484 sqrt(f); sqrtf(f); sqrtl(f);
485
486// NO__ERRNO: declare double @llvm.sqrt.f64(double) [[READNONE_INTRINSIC]]
487// NO__ERRNO: declare float @llvm.sqrt.f32(float) [[READNONE_INTRINSIC]]
488// NO__ERRNO: declare x86_fp80 @llvm.sqrt.f80(x86_fp80) [[READNONE_INTRINSIC]]
489// HAS_ERRNO: declare double @sqrt(double) [[NOT_READNONE]]
490// HAS_ERRNO: declare float @sqrtf(float) [[NOT_READNONE]]
491// HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NOT_READNONE]]
492
493 tan(f); tanf(f); tanl(f);
494
495// NO__ERRNO: declare double @tan(double) [[READNONE]]
496// NO__ERRNO: declare float @tanf(float) [[READNONE]]
497// NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[READNONE]]
498// HAS_ERRNO: declare double @tan(double) [[NOT_READNONE]]
499// HAS_ERRNO: declare float @tanf(float) [[NOT_READNONE]]
500// HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[NOT_READNONE]]
501
502 tanh(f); tanhf(f); tanhl(f);
503
504// NO__ERRNO: declare double @tanh(double) [[READNONE]]
505// NO__ERRNO: declare float @tanhf(float) [[READNONE]]
506// NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[READNONE]]
507// HAS_ERRNO: declare double @tanh(double) [[NOT_READNONE]]
508// HAS_ERRNO: declare float @tanhf(float) [[NOT_READNONE]]
509// HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[NOT_READNONE]]
510
511 tgamma(f); tgammaf(f); tgammal(f);
512
513// NO__ERRNO: declare double @tgamma(double) [[READNONE]]
514// NO__ERRNO: declare float @tgammaf(float) [[READNONE]]
515// NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[READNONE]]
516// HAS_ERRNO: declare double @tgamma(double) [[NOT_READNONE]]
517// HAS_ERRNO: declare float @tgammaf(float) [[NOT_READNONE]]
518// HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[NOT_READNONE]]
519
520 trunc(f); truncf(f); truncl(f);
521
522// NO__ERRNO: declare double @trunc(double) [[READNONE]]
523// NO__ERRNO: declare float @truncf(float) [[READNONE]]
524// NO__ERRNO: declare x86_fp80 @truncl(x86_fp80) [[READNONE]]
525// HAS_ERRNO: declare double @trunc(double) [[READNONE]]
526// HAS_ERRNO: declare float @truncf(float) [[READNONE]]
527// HAS_ERRNO: declare x86_fp80 @truncl(x86_fp80) [[READNONE]]
528
529 /* complex */
530
531 cabs(f); cabsf(f); cabsl(f);
532
533// NO__ERRNO: declare double @cabs(double, double) [[READNONE]]
534// NO__ERRNO: declare float @cabsf(<2 x float>) [[READNONE]]
535// NO__ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
536// HAS_ERRNO: declare double @cabs(double, double) [[READNONE]]
537// HAS_ERRNO: declare float @cabsf(<2 x float>) [[READNONE]]
538// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
539
540 cacos(f); cacosf(f); cacosl(f);
541
542// NO__ERRNO: declare { double, double } @cacos(double, double) [[READNONE]]
543// NO__ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]]
544// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
545// HAS_ERRNO: declare { double, double } @cacos(double, double) [[READNONE]]
546// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]]
547// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
548
549 cacosh(f); cacoshf(f); cacoshl(f);
550
551// NO__ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]]
552// NO__ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]]
553// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
554// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]]
555// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]]
556// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
557
558 carg(f); cargf(f); cargl(f);
559
560// NO__ERRNO: declare double @carg(double, double) [[READNONE]]
561// NO__ERRNO: declare float @cargf(<2 x float>) [[READNONE]]
562// NO__ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
563// HAS_ERRNO: declare double @carg(double, double) [[READNONE]]
564// HAS_ERRNO: declare float @cargf(<2 x float>) [[READNONE]]
565// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
566
567 casin(f); casinf(f); casinl(f);
568
569// NO__ERRNO: declare { double, double } @casin(double, double) [[READNONE]]
570// NO__ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]]
571// NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
572// HAS_ERRNO: declare { double, double } @casin(double, double) [[READNONE]]
573// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]]
574// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
575
576 casinh(f); casinhf(f); casinhl(f);
577
578// NO__ERRNO: declare { double, double } @casinh(double, double) [[READNONE]]
579// NO__ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]]
580// NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
581// HAS_ERRNO: declare { double, double } @casinh(double, double) [[READNONE]]
582// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]]
583// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
584
585 catan(f); catanf(f); catanl(f);
586
587// NO__ERRNO: declare { double, double } @catan(double, double) [[READNONE]]
588// NO__ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]]
589// NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
590// HAS_ERRNO: declare { double, double } @catan(double, double) [[READNONE]]
591// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]]
592// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
593
594 catanh(f); catanhf(f); catanhl(f);
595
596// NO__ERRNO: declare { double, double } @catanh(double, double) [[READNONE]]
597// NO__ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]]
598// NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
599// HAS_ERRNO: declare { double, double } @catanh(double, double) [[READNONE]]
600// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]]
601// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
602
603 ccos(f); ccosf(f); ccosl(f);
604
605// NO__ERRNO: declare { double, double } @ccos(double, double) [[READNONE]]
606// NO__ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]]
607// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
608// HAS_ERRNO: declare { double, double } @ccos(double, double) [[READNONE]]
609// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]]
610// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
611
612 ccosh(f); ccoshf(f); ccoshl(f);
613
614// NO__ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]]
615// NO__ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]]
616// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
617// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]]
618// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]]
619// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
620
621 cexp(f); cexpf(f); cexpl(f);
622
623// NO__ERRNO: declare { double, double } @cexp(double, double) [[READNONE]]
624// NO__ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]]
625// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
626// HAS_ERRNO: declare { double, double } @cexp(double, double) [[READNONE]]
627// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]]
628// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
629
630 cimag(f); cimagf(f); cimagl(f);
631
632// NO__ERRNO-NOT: .cimag
633// NO__ERRNO-NOT: @cimag
634// HAS_ERRNO-NOT: .cimag
635// HAS_ERRNO-NOT: @cimag
636
637 conj(f); conjf(f); conjl(f);
638
639// NO__ERRNO: declare { double, double } @conj(double, double) [[READNONE]]
640// NO__ERRNO: declare <2 x float> @conjf(<2 x float>) [[READNONE]]
641// NO__ERRNO: declare { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
642// HAS_ERRNO: declare { double, double } @conj(double, double) [[READNONE]]
643// HAS_ERRNO: declare <2 x float> @conjf(<2 x float>) [[READNONE]]
644// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
645
646 clog(f); clogf(f); clogl(f);
647
648// NO__ERRNO: declare { double, double } @clog(double, double) [[READNONE]]
649// NO__ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]]
650// NO__ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
651// HAS_ERRNO: declare { double, double } @clog(double, double) [[READNONE]]
652// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]]
653// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
654
655 cproj(f); cprojf(f); cprojl(f);
656
657// NO__ERRNO: declare { double, double } @cproj(double, double) [[READNONE]]
658// NO__ERRNO: declare <2 x float> @cprojf(<2 x float>) [[READNONE]]
659// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
660// HAS_ERRNO: declare { double, double } @cproj(double, double) [[READNONE]]
661// HAS_ERRNO: declare <2 x float> @cprojf(<2 x float>) [[READNONE]]
662// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
663
664 cpow(f,f); cpowf(f,f); cpowl(f,f);
665
666// NO__ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]]
667// NO__ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]]
668// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
669// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]]
670// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]]
671// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
672
673 creal(f); crealf(f); creall(f);
674
675// NO__ERRNO-NOT: .creal
676// NO__ERRNO-NOT: @creal
677// HAS_ERRNO-NOT: .creal
678// HAS_ERRNO-NOT: @creal
679
680 csin(f); csinf(f); csinl(f);
681
682// NO__ERRNO: declare { double, double } @csin(double, double) [[READNONE]]
683// NO__ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]]
684// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
685// HAS_ERRNO: declare { double, double } @csin(double, double) [[READNONE]]
686// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]]
687// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
688
689 csinh(f); csinhf(f); csinhl(f);
690
691// NO__ERRNO: declare { double, double } @csinh(double, double) [[READNONE]]
692// NO__ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]]
693// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
694// HAS_ERRNO: declare { double, double } @csinh(double, double) [[READNONE]]
695// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]]
696// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
697
698 csqrt(f); csqrtf(f); csqrtl(f);
699
700// NO__ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]]
701// NO__ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]]
702// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
703// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]]
704// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]]
705// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
706
707 ctan(f); ctanf(f); ctanl(f);
708
709// NO__ERRNO: declare { double, double } @ctan(double, double) [[READNONE]]
710// NO__ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]]
711// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
712// HAS_ERRNO: declare { double, double } @ctan(double, double) [[READNONE]]
713// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]]
714// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
715
716 ctanh(f); ctanhf(f); ctanhl(f);
717
718// NO__ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]]
719// NO__ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]]
720// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
721// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]]
722// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]]
723// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
724};
725
726
727// NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
728// NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} }
729// NO__ERRNO: attributes [[READONLY]] = { {{.*}}readonly{{.*}} }
730// NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
731
732// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} }
733// HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
734// HAS_ERRNO: attributes [[READONLY]] = { {{.*}}readonly{{.*}} }
735// HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
736