blob: 4b2361d12d9b788b490afdf4a1ea545da7eaf0ec [file] [log] [blame]
Sanjay Patel241b8f82017-11-02 17:06:05 +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 math, complex, and other builtin attributes 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 __builtin_abs(f); __builtin_labs(f); __builtin_llabs(f);
16
17// NO__ERRNO-NOT: .abs
18// NO__ERRNO-NOT: .labs
19// NO__ERRNO-NOT: .llabs
20// NO__ERRNO-NOT: @abs
21// NO__ERRNO-NOT: @labs
22// NO__ERRNO-NOT: @llabs
23// HAS_ERRNO-NOT: .abs
24// HAS_ERRNO-NOT: .labs
25// HAS_ERRNO-NOT: .llabs
26// HAS_ERRNO-NOT: @abs
27// HAS_ERRNO-NOT: @labs
28// HAS_ERRNO-NOT: @llabs
29
30 __builtin_atan2(f,f); __builtin_atan2f(f,f) ; __builtin_atan2l(f, f);
31
32// NO__ERRNO: declare double @atan2(double, double) [[READNONE:#[0-9]+]]
33// NO__ERRNO: declare float @atan2f(float, float) [[READNONE]]
34// NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +000035// HAS_ERRNO: declare double @atan2(double, double) [[NOT_READNONE:#[0-9]+]]
36// HAS_ERRNO: declare float @atan2f(float, float) [[NOT_READNONE]]
37// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +000038
39 __builtin_copysign(f,f); __builtin_copysignf(f,f);__builtin_copysignl(f,f);
40
41// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
42// NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
43// NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
44// HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
45// HAS_ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
46// HAS_ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
47
48 __builtin_fabs(f); __builtin_fabsf(f); __builtin_fabsl(f);
49
50// NO__ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]]
51// NO__ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]]
52// NO__ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
53// HAS_ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]]
54// HAS_ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]]
55// HAS_ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
56
57 __builtin_fmod(f,f); __builtin_fmodf(f,f); __builtin_fmodl(f,f);
58
59// NO__ERRNO-NOT: .fmod
60// NO__ERRNO-NOT: @fmod
61// HAS_ERRNO-NOT: .fmod
62// HAS_ERRNO-NOT: @fmod
63
64 __builtin_frexp(f,i); __builtin_frexpf(f,i); __builtin_frexpl(f,i);
65
66// NO__ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE:#[0-9]+]]
67// NO__ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
68// NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +000069// HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +000070// HAS_ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
71// HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
72
73 __builtin_huge_val(); __builtin_huge_valf(); __builtin_huge_vall();
74
75// NO__ERRNO-NOT: .huge
76// NO__ERRNO-NOT: @huge
77// HAS_ERRNO-NOT: .huge
78// HAS_ERRNO-NOT: @huge
79
80 __builtin_inf(); __builtin_inff(); __builtin_infl();
81
82// NO__ERRNO-NOT: .inf
83// NO__ERRNO-NOT: @inf
84// HAS_ERRNO-NOT: .inf
85// HAS_ERRNO-NOT: @inf
86
87 __builtin_ldexp(f,f); __builtin_ldexpf(f,f); __builtin_ldexpl(f,f);
88
89// NO__ERRNO: declare double @ldexp(double, i32) [[READNONE]]
90// NO__ERRNO: declare float @ldexpf(float, i32) [[READNONE]]
91// NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +000092// HAS_ERRNO: declare double @ldexp(double, i32) [[NOT_READNONE]]
93// HAS_ERRNO: declare float @ldexpf(float, i32) [[NOT_READNONE]]
94// HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +000095
96 __builtin_modf(f,d); __builtin_modff(f,fp); __builtin_modfl(f,l);
97
98// NO__ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
99// NO__ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
100// NO__ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
101// HAS_ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
102// HAS_ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
103// HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
104
105 __builtin_nan(c); __builtin_nanf(c); __builtin_nanl(c);
106
107// NO__ERRNO: declare double @nan(i8*) [[READNONE]]
108// NO__ERRNO: declare float @nanf(i8*) [[READNONE]]
109// NO__ERRNO: declare x86_fp80 @nanl(i8*) [[READNONE]]
110// HAS_ERRNO: declare double @nan(i8*) [[READNONE:#[0-9]+]]
111// HAS_ERRNO: declare float @nanf(i8*) [[READNONE]]
112// HAS_ERRNO: declare x86_fp80 @nanl(i8*) [[READNONE]]
113
114 __builtin_nans(c); __builtin_nansf(c); __builtin_nansl(c);
115
116// NO__ERRNO: declare double @nans(i8*) [[READNONE]]
117// NO__ERRNO: declare float @nansf(i8*) [[READNONE]]
118// NO__ERRNO: declare x86_fp80 @nansl(i8*) [[READNONE]]
119// HAS_ERRNO: declare double @nans(i8*) [[READNONE]]
120// HAS_ERRNO: declare float @nansf(i8*) [[READNONE]]
121// HAS_ERRNO: declare x86_fp80 @nansl(i8*) [[READNONE]]
122
123 __builtin_pow(f,f); __builtin_powf(f,f); __builtin_powl(f,f);
124
125// NO__ERRNO: declare double @llvm.pow.f64(double, double) [[READNONE_INTRINSIC]]
126// NO__ERRNO: declare float @llvm.pow.f32(float, float) [[READNONE_INTRINSIC]]
127// NO__ERRNO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000128// HAS_ERRNO: declare double @pow(double, double) [[NOT_READNONE]]
129// HAS_ERRNO: declare float @powf(float, float) [[NOT_READNONE]]
130// HAS_ERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000131
132 __builtin_powi(f,f); __builtin_powif(f,f); __builtin_powil(f,f);
133
134// NO__ERRNO: declare double @llvm.powi.f64(double, i32) [[READNONE_INTRINSIC]]
135// NO__ERRNO: declare float @llvm.powi.f32(float, i32) [[READNONE_INTRINSIC]]
136// NO__ERRNO: declare x86_fp80 @llvm.powi.f80(x86_fp80, i32) [[READNONE_INTRINSIC]]
137// HAS_ERRNO: declare double @llvm.powi.f64(double, i32) [[READNONE_INTRINSIC]]
138// HAS_ERRNO: declare float @llvm.powi.f32(float, i32) [[READNONE_INTRINSIC]]
139// HAS_ERRNO: declare x86_fp80 @llvm.powi.f80(x86_fp80, i32) [[READNONE_INTRINSIC]]
140
141 /* math */
142 __builtin_acos(f); __builtin_acosf(f); __builtin_acosl(f);
143
144// NO__ERRNO: declare double @acos(double) [[READNONE]]
145// NO__ERRNO: declare float @acosf(float) [[READNONE]]
146// NO__ERRNO: declare x86_fp80 @acosl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000147// HAS_ERRNO: declare double @acos(double) [[NOT_READNONE]]
148// HAS_ERRNO: declare float @acosf(float) [[NOT_READNONE]]
149// HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000150
151 __builtin_acosh(f); __builtin_acoshf(f); __builtin_acoshl(f);
152
153// NO__ERRNO: declare double @acosh(double) [[READNONE]]
154// NO__ERRNO: declare float @acoshf(float) [[READNONE]]
155// NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000156// HAS_ERRNO: declare double @acosh(double) [[NOT_READNONE]]
157// HAS_ERRNO: declare float @acoshf(float) [[NOT_READNONE]]
158// HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000159
160 __builtin_asin(f); __builtin_asinf(f); __builtin_asinl(f);
161
162// NO__ERRNO: declare double @asin(double) [[READNONE]]
163// NO__ERRNO: declare float @asinf(float) [[READNONE]]
164// NO__ERRNO: declare x86_fp80 @asinl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000165// HAS_ERRNO: declare double @asin(double) [[NOT_READNONE]]
166// HAS_ERRNO: declare float @asinf(float) [[NOT_READNONE]]
167// HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000168
169 __builtin_asinh(f); __builtin_asinhf(f); __builtin_asinhl(f);
170
171// NO__ERRNO: declare double @asinh(double) [[READNONE]]
172// NO__ERRNO: declare float @asinhf(float) [[READNONE]]
173// NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000174// HAS_ERRNO: declare double @asinh(double) [[NOT_READNONE]]
175// HAS_ERRNO: declare float @asinhf(float) [[NOT_READNONE]]
176// HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000177
178 __builtin_atan(f); __builtin_atanf(f); __builtin_atanl(f);
179
180// NO__ERRNO: declare double @atan(double) [[READNONE]]
181// NO__ERRNO: declare float @atanf(float) [[READNONE]]
182// NO__ERRNO: declare x86_fp80 @atanl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000183// HAS_ERRNO: declare double @atan(double) [[NOT_READNONE]]
184// HAS_ERRNO: declare float @atanf(float) [[NOT_READNONE]]
185// HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000186
187 __builtin_atanh(f); __builtin_atanhf(f); __builtin_atanhl(f);
188
189// NO__ERRNO: declare double @atanh(double) [[READNONE]]
190// NO__ERRNO: declare float @atanhf(float) [[READNONE]]
191// NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000192// HAS_ERRNO: declare double @atanh(double) [[NOT_READNONE]]
193// HAS_ERRNO: declare float @atanhf(float) [[NOT_READNONE]]
194// HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000195
196 __builtin_cbrt(f); __builtin_cbrtf(f); __builtin_cbrtl(f);
197
198// NO__ERRNO: declare double @cbrt(double) [[READNONE]]
199// NO__ERRNO: declare float @cbrtf(float) [[READNONE]]
200// NO__ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000201// HAS_ERRNO: declare double @cbrt(double) [[NOT_READNONE]]
202// HAS_ERRNO: declare float @cbrtf(float) [[NOT_READNONE]]
203// HAS_ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000204
205 __builtin_ceil(f); __builtin_ceilf(f); __builtin_ceill(f);
206
207// NO__ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
208// NO__ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
209// NO__ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
210// HAS_ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
211// HAS_ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
212// HAS_ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
213
214 __builtin_cos(f); __builtin_cosf(f); __builtin_cosl(f);
215
216// NO__ERRNO: declare double @cos(double) [[READNONE]]
217// NO__ERRNO: declare float @cosf(float) [[READNONE]]
218// NO__ERRNO: declare x86_fp80 @cosl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000219// HAS_ERRNO: declare double @cos(double) [[NOT_READNONE]]
220// HAS_ERRNO: declare float @cosf(float) [[NOT_READNONE]]
221// HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000222
223 __builtin_cosh(f); __builtin_coshf(f); __builtin_coshl(f);
224
225// NO__ERRNO: declare double @cosh(double) [[READNONE]]
226// NO__ERRNO: declare float @coshf(float) [[READNONE]]
227// NO__ERRNO: declare x86_fp80 @coshl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000228// HAS_ERRNO: declare double @cosh(double) [[NOT_READNONE]]
229// HAS_ERRNO: declare float @coshf(float) [[NOT_READNONE]]
230// HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000231
232 __builtin_erf(f); __builtin_erff(f); __builtin_erfl(f);
233
234// NO__ERRNO: declare double @erf(double) [[READNONE]]
235// NO__ERRNO: declare float @erff(float) [[READNONE]]
236// NO__ERRNO: declare x86_fp80 @erfl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000237// HAS_ERRNO: declare double @erf(double) [[NOT_READNONE]]
238// HAS_ERRNO: declare float @erff(float) [[NOT_READNONE]]
239// HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000240
241 __builtin_erfc(f); __builtin_erfcf(f); __builtin_erfcl(f);
242
243// NO__ERRNO: declare double @erfc(double) [[READNONE]]
244// NO__ERRNO: declare float @erfcf(float) [[READNONE]]
245// NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000246// HAS_ERRNO: declare double @erfc(double) [[NOT_READNONE]]
247// HAS_ERRNO: declare float @erfcf(float) [[NOT_READNONE]]
248// HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000249
250 __builtin_exp(f); __builtin_expf(f); __builtin_expl(f);
251
252// NO__ERRNO: declare double @exp(double) [[READNONE]]
253// NO__ERRNO: declare float @expf(float) [[READNONE]]
254// NO__ERRNO: declare x86_fp80 @expl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000255// HAS_ERRNO: declare double @exp(double) [[NOT_READNONE]]
256// HAS_ERRNO: declare float @expf(float) [[NOT_READNONE]]
257// HAS_ERRNO: declare x86_fp80 @expl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000258
259 __builtin_exp2(f); __builtin_exp2f(f); __builtin_exp2l(f);
260
261// NO__ERRNO: declare double @exp2(double) [[READNONE]]
262// NO__ERRNO: declare float @exp2f(float) [[READNONE]]
263// NO__ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000264// HAS_ERRNO: declare double @exp2(double) [[NOT_READNONE]]
265// HAS_ERRNO: declare float @exp2f(float) [[NOT_READNONE]]
266// HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000267
268 __builtin_expm1(f); __builtin_expm1f(f); __builtin_expm1l(f);
269
270// NO__ERRNO: declare double @expm1(double) [[READNONE]]
271// NO__ERRNO: declare float @expm1f(float) [[READNONE]]
272// NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000273// HAS_ERRNO: declare double @expm1(double) [[NOT_READNONE]]
274// HAS_ERRNO: declare float @expm1f(float) [[NOT_READNONE]]
275// HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000276
277 __builtin_fdim(f,f); __builtin_fdimf(f,f); __builtin_fdiml(f,f);
278
279// NO__ERRNO: declare double @fdim(double, double) [[READNONE]]
280// NO__ERRNO: declare float @fdimf(float, float) [[READNONE]]
281// NO__ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000282// HAS_ERRNO: declare double @fdim(double, double) [[NOT_READNONE]]
283// HAS_ERRNO: declare float @fdimf(float, float) [[NOT_READNONE]]
284// HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000285
286 __builtin_floor(f); __builtin_floorf(f); __builtin_floorl(f);
287
288// NO__ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
289// NO__ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
290// NO__ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
291// HAS_ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
292// HAS_ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
293// HAS_ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
294
295 __builtin_fma(f,f,f); __builtin_fmaf(f,f,f); __builtin_fmal(f,f,f);
296
297// NO__ERRNO: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC]]
298// NO__ERRNO: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
299// NO__ERRNO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
300// HAS_ERRNO: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC]]
301// HAS_ERRNO: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
302// HAS_ERRNO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
303
304 __builtin_fmax(f,f); __builtin_fmaxf(f,f); __builtin_fmaxl(f,f);
305
306// NO__ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
307// NO__ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
308// NO__ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
309// HAS_ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
310// HAS_ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
311// HAS_ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
312
313 __builtin_fmin(f,f); __builtin_fminf(f,f); __builtin_fminl(f,f);
314
315// NO__ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
316// NO__ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
317// NO__ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
318// HAS_ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
319// HAS_ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
320// HAS_ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
321
322 __builtin_hypot(f,f); __builtin_hypotf(f,f); __builtin_hypotl(f,f);
323
324// NO__ERRNO: declare double @hypot(double, double) [[READNONE]]
325// NO__ERRNO: declare float @hypotf(float, float) [[READNONE]]
326// NO__ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000327// HAS_ERRNO: declare double @hypot(double, double) [[NOT_READNONE]]
328// HAS_ERRNO: declare float @hypotf(float, float) [[NOT_READNONE]]
329// HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000330
331 __builtin_ilogb(f); __builtin_ilogbf(f); __builtin_ilogbl(f);
332
333// NO__ERRNO: declare i32 @ilogb(double) [[READNONE]]
334// NO__ERRNO: declare i32 @ilogbf(float) [[READNONE]]
335// NO__ERRNO: declare i32 @ilogbl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000336// HAS_ERRNO: declare i32 @ilogb(double) [[NOT_READNONE]]
337// HAS_ERRNO: declare i32 @ilogbf(float) [[NOT_READNONE]]
338// HAS_ERRNO: declare i32 @ilogbl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000339
340 __builtin_lgamma(f); __builtin_lgammaf(f); __builtin_lgammal(f);
341
Sanjay Patelc5c82072017-11-02 20:39:26 +0000342// NO__ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
343// NO__ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
344// NO__ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
345// HAS_ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
346// HAS_ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
347// HAS_ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000348
349 __builtin_llrint(f); __builtin_llrintf(f); __builtin_llrintl(f);
350
351// NO__ERRNO: declare i64 @llrint(double) [[READNONE]]
352// NO__ERRNO: declare i64 @llrintf(float) [[READNONE]]
353// NO__ERRNO: declare i64 @llrintl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000354// HAS_ERRNO: declare i64 @llrint(double) [[NOT_READNONE]]
355// HAS_ERRNO: declare i64 @llrintf(float) [[NOT_READNONE]]
356// HAS_ERRNO: declare i64 @llrintl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000357
358 __builtin_llround(f); __builtin_llroundf(f); __builtin_llroundl(f);
359
360// NO__ERRNO: declare i64 @llround(double) [[READNONE]]
361// NO__ERRNO: declare i64 @llroundf(float) [[READNONE]]
362// NO__ERRNO: declare i64 @llroundl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000363// HAS_ERRNO: declare i64 @llround(double) [[NOT_READNONE]]
364// HAS_ERRNO: declare i64 @llroundf(float) [[NOT_READNONE]]
365// HAS_ERRNO: declare i64 @llroundl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000366
367 __builtin_log(f); __builtin_logf(f); __builtin_logl(f);
368
369// NO__ERRNO: declare double @log(double) [[READNONE]]
370// NO__ERRNO: declare float @logf(float) [[READNONE]]
371// NO__ERRNO: declare x86_fp80 @logl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000372// HAS_ERRNO: declare double @log(double) [[NOT_READNONE]]
373// HAS_ERRNO: declare float @logf(float) [[NOT_READNONE]]
374// HAS_ERRNO: declare x86_fp80 @logl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000375
376 __builtin_log10(f); __builtin_log10f(f); __builtin_log10l(f);
377
378// NO__ERRNO: declare double @log10(double) [[READNONE]]
379// NO__ERRNO: declare float @log10f(float) [[READNONE]]
380// NO__ERRNO: declare x86_fp80 @log10l(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000381// HAS_ERRNO: declare double @log10(double) [[NOT_READNONE]]
382// HAS_ERRNO: declare float @log10f(float) [[NOT_READNONE]]
383// HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000384
385 __builtin_log1p(f); __builtin_log1pf(f); __builtin_log1pl(f);
386
387// NO__ERRNO: declare double @log1p(double) [[READNONE]]
388// NO__ERRNO: declare float @log1pf(float) [[READNONE]]
389// NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000390// HAS_ERRNO: declare double @log1p(double) [[NOT_READNONE]]
391// HAS_ERRNO: declare float @log1pf(float) [[NOT_READNONE]]
392// HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000393
394 __builtin_log2(f); __builtin_log2f(f); __builtin_log2l(f);
395
396// NO__ERRNO: declare double @log2(double) [[READNONE]]
397// NO__ERRNO: declare float @log2f(float) [[READNONE]]
398// NO__ERRNO: declare x86_fp80 @log2l(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000399// HAS_ERRNO: declare double @log2(double) [[NOT_READNONE]]
400// HAS_ERRNO: declare float @log2f(float) [[NOT_READNONE]]
401// HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000402
403 __builtin_logb(f); __builtin_logbf(f); __builtin_logbl(f);
404
405// NO__ERRNO: declare double @logb(double) [[READNONE]]
406// NO__ERRNO: declare float @logbf(float) [[READNONE]]
407// NO__ERRNO: declare x86_fp80 @logbl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000408// HAS_ERRNO: declare double @logb(double) [[NOT_READNONE]]
409// HAS_ERRNO: declare float @logbf(float) [[NOT_READNONE]]
410// HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000411
412 __builtin_lrint(f); __builtin_lrintf(f); __builtin_lrintl(f);
413
414// NO__ERRNO: declare i64 @lrint(double) [[READNONE]]
415// NO__ERRNO: declare i64 @lrintf(float) [[READNONE]]
416// NO__ERRNO: declare i64 @lrintl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000417// HAS_ERRNO: declare i64 @lrint(double) [[NOT_READNONE]]
418// HAS_ERRNO: declare i64 @lrintf(float) [[NOT_READNONE]]
419// HAS_ERRNO: declare i64 @lrintl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000420
421 __builtin_lround(f); __builtin_lroundf(f); __builtin_lroundl(f);
422
423// NO__ERRNO: declare i64 @lround(double) [[READNONE]]
424// NO__ERRNO: declare i64 @lroundf(float) [[READNONE]]
425// NO__ERRNO: declare i64 @lroundl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000426// HAS_ERRNO: declare i64 @lround(double) [[NOT_READNONE]]
427// HAS_ERRNO: declare i64 @lroundf(float) [[NOT_READNONE]]
428// HAS_ERRNO: declare i64 @lroundl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000429
430 __builtin_nearbyint(f); __builtin_nearbyintf(f); __builtin_nearbyintl(f);
431
432// NO__ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
433// NO__ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
434// NO__ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
435// HAS_ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
436// HAS_ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
437// HAS_ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
438
439 __builtin_nextafter(f,f); __builtin_nextafterf(f,f); __builtin_nextafterl(f,f);
440
441// NO__ERRNO: declare double @nextafter(double, double) [[READNONE]]
442// NO__ERRNO: declare float @nextafterf(float, float) [[READNONE]]
443// NO__ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000444// HAS_ERRNO: declare double @nextafter(double, double) [[NOT_READNONE]]
445// HAS_ERRNO: declare float @nextafterf(float, float) [[NOT_READNONE]]
446// HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000447
448 __builtin_nexttoward(f,f); __builtin_nexttowardf(f,f);__builtin_nexttowardl(f,f);
449
450// NO__ERRNO: declare double @nexttoward(double, x86_fp80) [[READNONE]]
451// NO__ERRNO: declare float @nexttowardf(float, x86_fp80) [[READNONE]]
452// NO__ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000453// HAS_ERRNO: declare double @nexttoward(double, x86_fp80) [[NOT_READNONE]]
454// HAS_ERRNO: declare float @nexttowardf(float, x86_fp80) [[NOT_READNONE]]
455// HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000456
457 __builtin_remainder(f,f); __builtin_remainderf(f,f); __builtin_remainderl(f,f);
458
459// NO__ERRNO: declare double @remainder(double, double) [[READNONE]]
460// NO__ERRNO: declare float @remainderf(float, float) [[READNONE]]
461// NO__ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000462// HAS_ERRNO: declare double @remainder(double, double) [[NOT_READNONE]]
463// HAS_ERRNO: declare float @remainderf(float, float) [[NOT_READNONE]]
464// HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000465
466 __builtin_remquo(f,f,i); __builtin_remquof(f,f,i); __builtin_remquol(f,f,i);
467
468// NO__ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
469// NO__ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
470// NO__ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
471// HAS_ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
472// HAS_ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
473// HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
474
475 __builtin_rint(f); __builtin_rintf(f); __builtin_rintl(f);
476
477// NO__ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
478// NO__ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
479// NO__ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
480// HAS_ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
481// HAS_ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
482// HAS_ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
483
484 __builtin_round(f); __builtin_roundf(f); __builtin_roundl(f);
485
486// NO__ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
487// NO__ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
488// NO__ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
489// HAS_ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
490// HAS_ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
491// HAS_ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
492
493 __builtin_scalbln(f,f); __builtin_scalblnf(f,f); __builtin_scalblnl(f,f);
494
495// NO__ERRNO: declare double @scalbln(double, i64) [[READNONE]]
496// NO__ERRNO: declare float @scalblnf(float, i64) [[READNONE]]
497// NO__ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000498// HAS_ERRNO: declare double @scalbln(double, i64) [[NOT_READNONE]]
499// HAS_ERRNO: declare float @scalblnf(float, i64) [[NOT_READNONE]]
500// HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000501
502 __builtin_scalbn(f,f); __builtin_scalbnf(f,f); __builtin_scalbnl(f,f);
503
504// NO__ERRNO: declare double @scalbn(double, i32) [[READNONE]]
505// NO__ERRNO: declare float @scalbnf(float, i32) [[READNONE]]
506// NO__ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000507// HAS_ERRNO: declare double @scalbn(double, i32) [[NOT_READNONE]]
508// HAS_ERRNO: declare float @scalbnf(float, i32) [[NOT_READNONE]]
509// HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000510
511 __builtin_sin(f); __builtin_sinf(f); __builtin_sinl(f);
512
513// NO__ERRNO: declare double @sin(double) [[READNONE]]
514// NO__ERRNO: declare float @sinf(float) [[READNONE]]
515// NO__ERRNO: declare x86_fp80 @sinl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000516// HAS_ERRNO: declare double @sin(double) [[NOT_READNONE]]
517// HAS_ERRNO: declare float @sinf(float) [[NOT_READNONE]]
518// HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000519
520 __builtin_sinh(f); __builtin_sinhf(f); __builtin_sinhl(f);
521
522// NO__ERRNO: declare double @sinh(double) [[READNONE]]
523// NO__ERRNO: declare float @sinhf(float) [[READNONE]]
524// NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000525// HAS_ERRNO: declare double @sinh(double) [[NOT_READNONE]]
526// HAS_ERRNO: declare float @sinhf(float) [[NOT_READNONE]]
527// HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000528
529 __builtin_sqrt(f); __builtin_sqrtf(f); __builtin_sqrtl(f);
530
531// NO__ERRNO: declare double @sqrt(double) [[READNONE]]
532// NO__ERRNO: declare float @sqrtf(float) [[READNONE]]
533// NO__ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000534// HAS_ERRNO: declare double @sqrt(double) [[NOT_READNONE]]
535// HAS_ERRNO: declare float @sqrtf(float) [[NOT_READNONE]]
536// HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000537
538 __builtin_tan(f); __builtin_tanf(f); __builtin_tanl(f);
539
540// NO__ERRNO: declare double @tan(double) [[READNONE]]
541// NO__ERRNO: declare float @tanf(float) [[READNONE]]
542// NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000543// HAS_ERRNO: declare double @tan(double) [[NOT_READNONE]]
544// HAS_ERRNO: declare float @tanf(float) [[NOT_READNONE]]
545// HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000546
547 __builtin_tanh(f); __builtin_tanhf(f); __builtin_tanhl(f);
548
549// NO__ERRNO: declare double @tanh(double) [[READNONE]]
550// NO__ERRNO: declare float @tanhf(float) [[READNONE]]
551// NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000552// HAS_ERRNO: declare double @tanh(double) [[NOT_READNONE]]
553// HAS_ERRNO: declare float @tanhf(float) [[NOT_READNONE]]
554// HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000555
556 __builtin_tgamma(f); __builtin_tgammaf(f); __builtin_tgammal(f);
557
558// NO__ERRNO: declare double @tgamma(double) [[READNONE]]
559// NO__ERRNO: declare float @tgammaf(float) [[READNONE]]
560// NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[READNONE]]
Sanjay Patelc5c82072017-11-02 20:39:26 +0000561// HAS_ERRNO: declare double @tgamma(double) [[NOT_READNONE]]
562// HAS_ERRNO: declare float @tgammaf(float) [[NOT_READNONE]]
563// HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[NOT_READNONE]]
Sanjay Patel241b8f82017-11-02 17:06:05 +0000564
565 __builtin_trunc(f); __builtin_truncf(f); __builtin_truncl(f);
566
567// NO__ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
568// NO__ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
569// NO__ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
570// HAS_ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
571// HAS_ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
572// HAS_ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
573
574 /* complex */
575
576 __builtin_cabs(f); __builtin_cabsf(f); __builtin_cabsl(f);
577
578// NO__ERRNO: declare double @cabs(double, double) [[READNONE]]
579// NO__ERRNO: declare float @cabsf(<2 x float>) [[READNONE]]
580// NO__ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
581// HAS_ERRNO: declare double @cabs(double, double) [[READNONE]]
582// HAS_ERRNO: declare float @cabsf(<2 x float>) [[READNONE]]
583// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
584
585 __builtin_cacos(f); __builtin_cacosf(f); __builtin_cacosl(f);
586
587// NO__ERRNO: declare { double, double } @cacos(double, double) [[READNONE]]
588// NO__ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]]
589// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
590// HAS_ERRNO: declare { double, double } @cacos(double, double) [[READNONE]]
591// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]]
592// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
593
594 __builtin_cacosh(f); __builtin_cacoshf(f); __builtin_cacoshl(f);
595
596// NO__ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]]
597// NO__ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]]
598// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
599// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]]
600// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]]
601// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
602
603 __builtin_carg(f); __builtin_cargf(f); __builtin_cargl(f);
604
605// NO__ERRNO: declare double @carg(double, double) [[READNONE]]
606// NO__ERRNO: declare float @cargf(<2 x float>) [[READNONE]]
607// NO__ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
608// HAS_ERRNO: declare double @carg(double, double) [[READNONE]]
609// HAS_ERRNO: declare float @cargf(<2 x float>) [[READNONE]]
610// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
611
612 __builtin_casin(f); __builtin_casinf(f); __builtin_casinl(f);
613
614// NO__ERRNO: declare { double, double } @casin(double, double) [[READNONE]]
615// NO__ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]]
616// NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
617// HAS_ERRNO: declare { double, double } @casin(double, double) [[READNONE]]
618// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]]
619// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
620
621 __builtin_casinh(f); __builtin_casinhf(f); __builtin_casinhl(f);
622
623// NO__ERRNO: declare { double, double } @casinh(double, double) [[READNONE]]
624// NO__ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]]
625// NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
626// HAS_ERRNO: declare { double, double } @casinh(double, double) [[READNONE]]
627// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]]
628// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
629
630 __builtin_catan(f); __builtin_catanf(f); __builtin_catanl(f);
631
632// NO__ERRNO: declare { double, double } @catan(double, double) [[READNONE]]
633// NO__ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]]
634// NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
635// HAS_ERRNO: declare { double, double } @catan(double, double) [[READNONE]]
636// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]]
637// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
638
639 __builtin_catanh(f); __builtin_catanhf(f); __builtin_catanhl(f);
640
641// NO__ERRNO: declare { double, double } @catanh(double, double) [[READNONE]]
642// NO__ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]]
643// NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
644// HAS_ERRNO: declare { double, double } @catanh(double, double) [[READNONE]]
645// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]]
646// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
647
648 __builtin_ccos(f); __builtin_ccosf(f); __builtin_ccosl(f);
649
650// NO__ERRNO: declare { double, double } @ccos(double, double) [[READNONE]]
651// NO__ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]]
652// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
653// HAS_ERRNO: declare { double, double } @ccos(double, double) [[READNONE]]
654// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]]
655// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
656
657 __builtin_ccosh(f); __builtin_ccoshf(f); __builtin_ccoshl(f);
658
659// NO__ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]]
660// NO__ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]]
661// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
662// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]]
663// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]]
664// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
665
666 __builtin_cexp(f); __builtin_cexpf(f); __builtin_cexpl(f);
667
668// NO__ERRNO: declare { double, double } @cexp(double, double) [[READNONE]]
669// NO__ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]]
670// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
671// HAS_ERRNO: declare { double, double } @cexp(double, double) [[READNONE]]
672// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]]
673// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
674
675 __builtin_cimag(f); __builtin_cimagf(f); __builtin_cimagl(f);
676
677// NO__ERRNO-NOT: .cimag
678// NO__ERRNO-NOT: @cimag
679// HAS_ERRNO-NOT: .cimag
680// HAS_ERRNO-NOT: @cimag
681
682 __builtin_conj(f); __builtin_conjf(f); __builtin_conjl(f);
683
684// NO__ERRNO-NOT: .conj
685// NO__ERRNO-NOT: @conj
686// HAS_ERRNO-NOT: .conj
687// HAS_ERRNO-NOT: @conj
688
689 __builtin_clog(f); __builtin_clogf(f); __builtin_clogl(f);
690
691// NO__ERRNO: declare { double, double } @clog(double, double) [[READNONE]]
692// NO__ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]]
693// NO__ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
694// HAS_ERRNO: declare { double, double } @clog(double, double) [[READNONE]]
695// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]]
696// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
697
698 __builtin_cproj(f); __builtin_cprojf(f); __builtin_cprojl(f);
699
700// NO__ERRNO: declare { double, double } @cproj(double, double) [[READNONE]]
701// NO__ERRNO: declare <2 x float> @cprojf(<2 x float>) [[READNONE]]
702// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
703// HAS_ERRNO: declare { double, double } @cproj(double, double) [[READNONE]]
704// HAS_ERRNO: declare <2 x float> @cprojf(<2 x float>) [[READNONE]]
705// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
706
707 __builtin_cpow(f,f); __builtin_cpowf(f,f); __builtin_cpowl(f,f);
708
709// NO__ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]]
710// NO__ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]]
711// NO__ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
712// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]]
713// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]]
714// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
715
716 __builtin_creal(f); __builtin_crealf(f); __builtin_creall(f);
717
718// NO__ERRNO-NOT: .creal
719// NO__ERRNO-NOT: @creal
720// HAS_ERRNO-NOT: .creal
721// HAS_ERRNO-NOT: @creal
722
723 __builtin_csin(f); __builtin_csinf(f); __builtin_csinl(f);
724
725// NO__ERRNO: declare { double, double } @csin(double, double) [[READNONE]]
726// NO__ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]]
727// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
728// HAS_ERRNO: declare { double, double } @csin(double, double) [[READNONE]]
729// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]]
730// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
731
732 __builtin_csinh(f); __builtin_csinhf(f); __builtin_csinhl(f);
733
734// NO__ERRNO: declare { double, double } @csinh(double, double) [[READNONE]]
735// NO__ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]]
736// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
737// HAS_ERRNO: declare { double, double } @csinh(double, double) [[READNONE]]
738// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]]
739// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
740
741 __builtin_csqrt(f); __builtin_csqrtf(f); __builtin_csqrtl(f);
742
743// NO__ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]]
744// NO__ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]]
745// NO__ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
746// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]]
747// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]]
748// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
749
750 __builtin_ctan(f); __builtin_ctanf(f); __builtin_ctanl(f);
751
752// NO__ERRNO: declare { double, double } @ctan(double, double) [[READNONE]]
753// NO__ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]]
754// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
755// HAS_ERRNO: declare { double, double } @ctan(double, double) [[READNONE]]
756// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]]
757// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
758
759 __builtin_ctanh(f); __builtin_ctanhf(f); __builtin_ctanhl(f);
760
761// NO__ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]]
762// NO__ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]]
763// NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
764// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]]
765// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]]
766// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]]
767};
768
769
770// NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
771// NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
772// NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} }
773
Sanjay Patel241b8f82017-11-02 17:06:05 +0000774// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} }
Sanjay Patelc5c82072017-11-02 20:39:26 +0000775// HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
776// HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
Sanjay Patel241b8f82017-11-02 17:06:05 +0000777