1 // 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 // RUN: %clang_cc1 -triple x86_64-unknown-unknown-gnu -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_GNU
4 // RUN: %clang_cc1 -triple x86_64-unknown-unknown-android -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_ANDROID
5 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_WIN
6 
7 // Test attributes and codegen of math builtins.
8 
foo(double * d,float f,float * fp,long double * l,int * i,const char * c)9 void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
10   f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f);  f = __builtin_fmodf128(f,f);
11 
12 // NO__ERRNO: frem double
13 // NO__ERRNO: frem float
14 // NO__ERRNO: frem x86_fp80
15 // NO__ERRNO: frem fp128
16 // HAS_ERRNO: declare double @fmod(double, double) [[NOT_READNONE:#[0-9]+]]
17 // HAS_ERRNO: declare float @fmodf(float, float) [[NOT_READNONE]]
18 // HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80, x86_fp80) [[NOT_READNONE]]
19 // HAS_ERRNO: declare fp128 @fmodf128(fp128, fp128) [[NOT_READNONE]]
20 
21   __builtin_atan2(f,f);    __builtin_atan2f(f,f) ;  __builtin_atan2l(f, f); __builtin_atan2f128(f,f);
22 
23 // NO__ERRNO: declare double @atan2(double, double) [[READNONE:#[0-9]+]]
24 // NO__ERRNO: declare float @atan2f(float, float) [[READNONE]]
25 // NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[READNONE]]
26 // NO__ERRNO: declare fp128 @atan2f128(fp128, fp128) [[READNONE]]
27 // HAS_ERRNO: declare double @atan2(double, double) [[NOT_READNONE]]
28 // HAS_ERRNO: declare float @atan2f(float, float) [[NOT_READNONE]]
29 // HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NOT_READNONE]]
30 // HAS_ERRNO: declare fp128 @atan2f128(fp128, fp128) [[NOT_READNONE]]
31 
32   __builtin_copysign(f,f); __builtin_copysignf(f,f); __builtin_copysignl(f,f); __builtin_copysignf128(f,f);
33 
34 // NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
35 // NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
36 // NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
37 // NO__ERRNO: declare fp128 @llvm.copysign.f128(fp128, fp128) [[READNONE_INTRINSIC]]
38 // HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
39 // HAS_ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
40 // HAS_ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
41 // HAS_ERRNO: declare fp128 @llvm.copysign.f128(fp128, fp128) [[READNONE_INTRINSIC]]
42 
43   __builtin_fabs(f);       __builtin_fabsf(f);      __builtin_fabsl(f); __builtin_fabsf128(f);
44 
45 // NO__ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]]
46 // NO__ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]]
47 // NO__ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
48 // NO__ERRNO: declare fp128 @llvm.fabs.f128(fp128) [[READNONE_INTRINSIC]]
49 // HAS_ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]]
50 // HAS_ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]]
51 // HAS_ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
52 // HAS_ERRNO: declare fp128 @llvm.fabs.f128(fp128) [[READNONE_INTRINSIC]]
53 
54   __builtin_frexp(f,i);    __builtin_frexpf(f,i);   __builtin_frexpl(f,i); __builtin_frexpf128(f,i);
55 
56 // NO__ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE:#[0-9]+]]
57 // NO__ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
58 // NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
59 // NO__ERRNO: declare fp128 @frexpf128(fp128, i32*) [[NOT_READNONE]]
60 // HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE]]
61 // HAS_ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
62 // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
63 // HAS_ERRNO: declare fp128 @frexpf128(fp128, i32*) [[NOT_READNONE]]
64 
65   __builtin_huge_val();    __builtin_huge_valf();   __builtin_huge_vall(); __builtin_huge_valf128();
66 
67 // NO__ERRNO-NOT: .huge
68 // NO__ERRNO-NOT: @huge
69 // HAS_ERRNO-NOT: .huge
70 // HAS_ERRNO-NOT: @huge
71 
72   __builtin_inf();    __builtin_inff();   __builtin_infl(); __builtin_inff128();
73 
74 // NO__ERRNO-NOT: .inf
75 // NO__ERRNO-NOT: @inf
76 // HAS_ERRNO-NOT: .inf
77 // HAS_ERRNO-NOT: @inf
78 
79   __builtin_ldexp(f,f);    __builtin_ldexpf(f,f);   __builtin_ldexpl(f,f);  __builtin_ldexpf128(f,f);
80 
81 // NO__ERRNO: declare double @ldexp(double, i32) [[READNONE]]
82 // NO__ERRNO: declare float @ldexpf(float, i32) [[READNONE]]
83 // NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[READNONE]]
84 // NO__ERRNO: declare fp128 @ldexpf128(fp128, i32) [[READNONE]]
85 // HAS_ERRNO: declare double @ldexp(double, i32) [[NOT_READNONE]]
86 // HAS_ERRNO: declare float @ldexpf(float, i32) [[NOT_READNONE]]
87 // HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[NOT_READNONE]]
88 // HAS_ERRNO: declare fp128 @ldexpf128(fp128, i32) [[NOT_READNONE]]
89 
90   __builtin_modf(f,d);       __builtin_modff(f,fp);      __builtin_modfl(f,l); __builtin_modff128(f,l);
91 
92 // NO__ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
93 // NO__ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
94 // NO__ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
95 // NO__ERRNO: declare fp128 @modff128(fp128, fp128*) [[NOT_READNONE]]
96 // HAS_ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
97 // HAS_ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
98 // HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
99 // HAS_ERRNO: declare fp128 @modff128(fp128, fp128*) [[NOT_READNONE]]
100 
101   __builtin_nan(c);        __builtin_nanf(c);       __builtin_nanl(c); __builtin_nanf128(c);
102 
103 // NO__ERRNO: declare double @nan(i8*) [[PURE:#[0-9]+]]
104 // NO__ERRNO: declare float @nanf(i8*) [[PURE]]
105 // NO__ERRNO: declare x86_fp80 @nanl(i8*) [[PURE]]
106 // NO__ERRNO: declare fp128 @nanf128(i8*) [[PURE]]
107 // HAS_ERRNO: declare double @nan(i8*) [[PURE:#[0-9]+]]
108 // HAS_ERRNO: declare float @nanf(i8*) [[PURE]]
109 // HAS_ERRNO: declare x86_fp80 @nanl(i8*) [[PURE]]
110 // HAS_ERRNO: declare fp128 @nanf128(i8*) [[PURE]]
111 
112   __builtin_nans(c);        __builtin_nansf(c);       __builtin_nansl(c); __builtin_nansf128(c);
113 
114 // NO__ERRNO: declare double @nans(i8*) [[PURE]]
115 // NO__ERRNO: declare float @nansf(i8*) [[PURE]]
116 // NO__ERRNO: declare x86_fp80 @nansl(i8*) [[PURE]]
117 // NO__ERRNO: declare fp128 @nansf128(i8*) [[PURE]]
118 // HAS_ERRNO: declare double @nans(i8*) [[PURE]]
119 // HAS_ERRNO: declare float @nansf(i8*) [[PURE]]
120 // HAS_ERRNO: declare x86_fp80 @nansl(i8*) [[PURE]]
121 // HAS_ERRNO: declare fp128 @nansf128(i8*) [[PURE]]
122 
123   __builtin_pow(f,f);        __builtin_powf(f,f);       __builtin_powl(f,f); __builtin_powf128(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]]
128 // NO__ERRNO: declare fp128 @llvm.pow.f128(fp128, fp128) [[READNONE_INTRINSIC]]
129 // HAS_ERRNO: declare double @pow(double, double) [[NOT_READNONE]]
130 // HAS_ERRNO: declare float @powf(float, float) [[NOT_READNONE]]
131 // HAS_ERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[NOT_READNONE]]
132 // HAS_ERRNO: declare fp128 @powf128(fp128, fp128) [[NOT_READNONE]]
133 
134   __builtin_powi(f,f);        __builtin_powif(f,f);       __builtin_powil(f,f);
135 
136 // NO__ERRNO: declare double @llvm.powi.f64.i32(double, i32) [[READNONE_INTRINSIC]]
137 // NO__ERRNO: declare float @llvm.powi.f32.i32(float, i32) [[READNONE_INTRINSIC]]
138 // NO__ERRNO: declare x86_fp80 @llvm.powi.f80.i32(x86_fp80, i32) [[READNONE_INTRINSIC]]
139 // HAS_ERRNO: declare double @llvm.powi.f64.i32(double, i32) [[READNONE_INTRINSIC]]
140 // HAS_ERRNO: declare float @llvm.powi.f32.i32(float, i32) [[READNONE_INTRINSIC]]
141 // HAS_ERRNO: declare x86_fp80 @llvm.powi.f80.i32(x86_fp80, i32) [[READNONE_INTRINSIC]]
142 
143   /* math */
144   __builtin_acos(f);       __builtin_acosf(f);      __builtin_acosl(f); __builtin_acosf128(f);
145 
146 // NO__ERRNO: declare double @acos(double) [[READNONE]]
147 // NO__ERRNO: declare float @acosf(float) [[READNONE]]
148 // NO__ERRNO: declare x86_fp80 @acosl(x86_fp80) [[READNONE]]
149 // NO__ERRNO: declare fp128 @acosf128(fp128) [[READNONE]]
150 // HAS_ERRNO: declare double @acos(double) [[NOT_READNONE]]
151 // HAS_ERRNO: declare float @acosf(float) [[NOT_READNONE]]
152 // HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80) [[NOT_READNONE]]
153 // HAS_ERRNO: declare fp128 @acosf128(fp128) [[NOT_READNONE]]
154 
155   __builtin_acosh(f);      __builtin_acoshf(f);     __builtin_acoshl(f);  __builtin_acoshf128(f);
156 
157 // NO__ERRNO: declare double @acosh(double) [[READNONE]]
158 // NO__ERRNO: declare float @acoshf(float) [[READNONE]]
159 // NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[READNONE]]
160 // NO__ERRNO: declare fp128 @acoshf128(fp128) [[READNONE]]
161 // HAS_ERRNO: declare double @acosh(double) [[NOT_READNONE]]
162 // HAS_ERRNO: declare float @acoshf(float) [[NOT_READNONE]]
163 // HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[NOT_READNONE]]
164 // HAS_ERRNO: declare fp128 @acoshf128(fp128) [[NOT_READNONE]]
165 
166   __builtin_asin(f);       __builtin_asinf(f);      __builtin_asinl(f); __builtin_asinf128(f);
167 
168 // NO__ERRNO: declare double @asin(double) [[READNONE]]
169 // NO__ERRNO: declare float @asinf(float) [[READNONE]]
170 // NO__ERRNO: declare x86_fp80 @asinl(x86_fp80) [[READNONE]]
171 // NO__ERRNO: declare fp128 @asinf128(fp128) [[READNONE]]
172 // HAS_ERRNO: declare double @asin(double) [[NOT_READNONE]]
173 // HAS_ERRNO: declare float @asinf(float) [[NOT_READNONE]]
174 // HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80) [[NOT_READNONE]]
175 // HAS_ERRNO: declare fp128 @asinf128(fp128) [[NOT_READNONE]]
176 
177   __builtin_asinh(f);      __builtin_asinhf(f);     __builtin_asinhl(f); __builtin_asinhf128(f);
178 
179 // NO__ERRNO: declare double @asinh(double) [[READNONE]]
180 // NO__ERRNO: declare float @asinhf(float) [[READNONE]]
181 // NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[READNONE]]
182 // NO__ERRNO: declare fp128 @asinhf128(fp128) [[READNONE]]
183 // HAS_ERRNO: declare double @asinh(double) [[NOT_READNONE]]
184 // HAS_ERRNO: declare float @asinhf(float) [[NOT_READNONE]]
185 // HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[NOT_READNONE]]
186 // HAS_ERRNO: declare fp128 @asinhf128(fp128) [[NOT_READNONE]]
187 
188   __builtin_atan(f);       __builtin_atanf(f);      __builtin_atanl(f); __builtin_atanf128(f);
189 
190 // NO__ERRNO: declare double @atan(double) [[READNONE]]
191 // NO__ERRNO: declare float @atanf(float) [[READNONE]]
192 // NO__ERRNO: declare x86_fp80 @atanl(x86_fp80) [[READNONE]]
193 // NO__ERRNO: declare fp128 @atanf128(fp128) [[READNONE]]
194 // HAS_ERRNO: declare double @atan(double) [[NOT_READNONE]]
195 // HAS_ERRNO: declare float @atanf(float) [[NOT_READNONE]]
196 // HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80) [[NOT_READNONE]]
197 // HAS_ERRNO: declare fp128 @atanf128(fp128) [[NOT_READNONE]]
198 
199   __builtin_atanh(f);      __builtin_atanhf(f);     __builtin_atanhl(f); __builtin_atanhf128(f);
200 
201 // NO__ERRNO: declare double @atanh(double) [[READNONE]]
202 // NO__ERRNO: declare float @atanhf(float) [[READNONE]]
203 // NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[READNONE]]
204 // NO__ERRNO: declare fp128 @atanhf128(fp128) [[READNONE]]
205 // HAS_ERRNO: declare double @atanh(double) [[NOT_READNONE]]
206 // HAS_ERRNO: declare float @atanhf(float) [[NOT_READNONE]]
207 // HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[NOT_READNONE]]
208 // HAS_ERRNO: declare fp128 @atanhf128(fp128) [[NOT_READNONE]]
209 
210   __builtin_cbrt(f);       __builtin_cbrtf(f);      __builtin_cbrtl(f); __builtin_cbrtf128(f);
211 
212 // NO__ERRNO: declare double @cbrt(double) [[READNONE]]
213 // NO__ERRNO: declare float @cbrtf(float) [[READNONE]]
214 // NO__ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[READNONE]]
215 // NO__ERRNO: declare fp128 @cbrtf128(fp128) [[READNONE]]
216 // HAS_ERRNO: declare double @cbrt(double) [[READNONE:#[0-9]+]]
217 // HAS_ERRNO: declare float @cbrtf(float) [[READNONE]]
218 // HAS_ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[READNONE]]
219 // HAS_ERRNO: declare fp128 @cbrtf128(fp128) [[READNONE]]
220 
221   __builtin_ceil(f);       __builtin_ceilf(f);      __builtin_ceill(f); __builtin_ceilf128(f);
222 
223 // NO__ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
224 // NO__ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
225 // NO__ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
226 // NO__ERRNO: declare fp128 @llvm.ceil.f128(fp128) [[READNONE_INTRINSIC]]
227 // HAS_ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
228 // HAS_ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
229 // HAS_ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
230 // HAS_ERRNO: declare fp128 @llvm.ceil.f128(fp128) [[READNONE_INTRINSIC]]
231 
232   __builtin_cos(f);        __builtin_cosf(f);       __builtin_cosl(f); __builtin_cosf128(f);
233 
234 // NO__ERRNO: declare double @llvm.cos.f64(double) [[READNONE_INTRINSIC]]
235 // NO__ERRNO: declare float @llvm.cos.f32(float) [[READNONE_INTRINSIC]]
236 // NO__ERRNO: declare x86_fp80 @llvm.cos.f80(x86_fp80) [[READNONE_INTRINSIC]]
237 // NO__ERRNO: declare fp128 @llvm.cos.f128(fp128) [[READNONE_INTRINSIC]]
238 // HAS_ERRNO: declare double @cos(double) [[NOT_READNONE]]
239 // HAS_ERRNO: declare float @cosf(float) [[NOT_READNONE]]
240 // HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80) [[NOT_READNONE]]
241 // HAS_ERRNO: declare fp128 @cosf128(fp128) [[NOT_READNONE]]
242 
243   __builtin_cosh(f);       __builtin_coshf(f);      __builtin_coshl(f); __builtin_coshf128(f);
244 
245 // NO__ERRNO: declare double @cosh(double) [[READNONE]]
246 // NO__ERRNO: declare float @coshf(float) [[READNONE]]
247 // NO__ERRNO: declare x86_fp80 @coshl(x86_fp80) [[READNONE]]
248 // NO__ERRNO: declare fp128 @coshf128(fp128) [[READNONE]]
249 // HAS_ERRNO: declare double @cosh(double) [[NOT_READNONE]]
250 // HAS_ERRNO: declare float @coshf(float) [[NOT_READNONE]]
251 // HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80) [[NOT_READNONE]]
252 // HAS_ERRNO: declare fp128 @coshf128(fp128) [[NOT_READNONE]]
253 
254   __builtin_erf(f);        __builtin_erff(f);       __builtin_erfl(f); __builtin_erff128(f);
255 
256 // NO__ERRNO: declare double @erf(double) [[READNONE]]
257 // NO__ERRNO: declare float @erff(float) [[READNONE]]
258 // NO__ERRNO: declare x86_fp80 @erfl(x86_fp80) [[READNONE]]
259 // NO__ERRNO: declare fp128 @erff128(fp128) [[READNONE]]
260 // HAS_ERRNO: declare double @erf(double) [[NOT_READNONE]]
261 // HAS_ERRNO: declare float @erff(float) [[NOT_READNONE]]
262 // HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80) [[NOT_READNONE]]
263 // HAS_ERRNO: declare fp128 @erff128(fp128) [[NOT_READNONE]]
264 
265 __builtin_erfc(f);       __builtin_erfcf(f);      __builtin_erfcl(f); __builtin_erfcf128(f);
266 
267 // NO__ERRNO: declare double @erfc(double) [[READNONE]]
268 // NO__ERRNO: declare float @erfcf(float) [[READNONE]]
269 // NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[READNONE]]
270 // NO__ERRNO: declare fp128 @erfcf128(fp128) [[READNONE]]
271 // HAS_ERRNO: declare double @erfc(double) [[NOT_READNONE]]
272 // HAS_ERRNO: declare float @erfcf(float) [[NOT_READNONE]]
273 // HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[NOT_READNONE]]
274 // HAS_ERRNO: declare fp128 @erfcf128(fp128) [[NOT_READNONE]]
275 
276 __builtin_exp(f);        __builtin_expf(f);       __builtin_expl(f); __builtin_expf128(f);
277 
278 // NO__ERRNO: declare double @llvm.exp.f64(double) [[READNONE_INTRINSIC]]
279 // NO__ERRNO: declare float @llvm.exp.f32(float) [[READNONE_INTRINSIC]]
280 // NO__ERRNO: declare x86_fp80 @llvm.exp.f80(x86_fp80) [[READNONE_INTRINSIC]]
281 // NO__ERRNO: declare fp128 @llvm.exp.f128(fp128) [[READNONE_INTRINSIC]]
282 // HAS_ERRNO: declare double @exp(double) [[NOT_READNONE]]
283 // HAS_ERRNO: declare float @expf(float) [[NOT_READNONE]]
284 // HAS_ERRNO: declare x86_fp80 @expl(x86_fp80) [[NOT_READNONE]]
285 // HAS_ERRNO: declare fp128 @expf128(fp128) [[NOT_READNONE]]
286 
287 __builtin_exp2(f);       __builtin_exp2f(f);      __builtin_exp2l(f); __builtin_exp2f128(f);
288 
289 // NO__ERRNO: declare double @llvm.exp2.f64(double) [[READNONE_INTRINSIC]]
290 // NO__ERRNO: declare float @llvm.exp2.f32(float) [[READNONE_INTRINSIC]]
291 // NO__ERRNO: declare x86_fp80 @llvm.exp2.f80(x86_fp80) [[READNONE_INTRINSIC]]
292 // NO__ERRNO: declare fp128 @llvm.exp2.f128(fp128) [[READNONE_INTRINSIC]]
293 // HAS_ERRNO: declare double @exp2(double) [[NOT_READNONE]]
294 // HAS_ERRNO: declare float @exp2f(float) [[NOT_READNONE]]
295 // HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[NOT_READNONE]]
296 // HAS_ERRNO: declare fp128 @exp2f128(fp128) [[NOT_READNONE]]
297 
298 __builtin_expm1(f);      __builtin_expm1f(f);     __builtin_expm1l(f); __builtin_expm1f128(f);
299 
300 // NO__ERRNO: declare double @expm1(double) [[READNONE]]
301 // NO__ERRNO: declare float @expm1f(float) [[READNONE]]
302 // NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[READNONE]]
303 // NO__ERRNO: declare fp128 @expm1f128(fp128) [[READNONE]]
304 // HAS_ERRNO: declare double @expm1(double) [[NOT_READNONE]]
305 // HAS_ERRNO: declare float @expm1f(float) [[NOT_READNONE]]
306 // HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[NOT_READNONE]]
307 // HAS_ERRNO: declare fp128 @expm1f128(fp128) [[NOT_READNONE]]
308 
309 __builtin_fdim(f,f);       __builtin_fdimf(f,f);      __builtin_fdiml(f,f); __builtin_fdimf128(f,f);
310 
311 // NO__ERRNO: declare double @fdim(double, double) [[READNONE]]
312 // NO__ERRNO: declare float @fdimf(float, float) [[READNONE]]
313 // NO__ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[READNONE]]
314 // NO__ERRNO: declare fp128 @fdimf128(fp128, fp128) [[READNONE]]
315 // HAS_ERRNO: declare double @fdim(double, double) [[NOT_READNONE]]
316 // HAS_ERRNO: declare float @fdimf(float, float) [[NOT_READNONE]]
317 // HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[NOT_READNONE]]
318 // HAS_ERRNO: declare fp128 @fdimf128(fp128, fp128) [[NOT_READNONE]]
319 
320 __builtin_floor(f);      __builtin_floorf(f);     __builtin_floorl(f); __builtin_floorf128(f);
321 
322 // NO__ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
323 // NO__ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
324 // NO__ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
325 // NO__ERRNO: declare fp128 @llvm.floor.f128(fp128) [[READNONE_INTRINSIC]]
326 // HAS_ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
327 // HAS_ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
328 // HAS_ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
329 // HAS_ERRNO: declare fp128 @llvm.floor.f128(fp128) [[READNONE_INTRINSIC]]
330 
331 __builtin_fma(f,f,f);        __builtin_fmaf(f,f,f);       __builtin_fmal(f,f,f); __builtin_fmaf128(f,f,f);
332 
333 // NO__ERRNO: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC]]
334 // NO__ERRNO: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
335 // NO__ERRNO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
336 // NO__ERRNO: declare fp128 @llvm.fma.f128(fp128, fp128, fp128) [[READNONE_INTRINSIC]]
337 // HAS_ERRNO: declare double @fma(double, double, double) [[NOT_READNONE]]
338 // HAS_ERRNO: declare float @fmaf(float, float, float) [[NOT_READNONE]]
339 // HAS_ERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[NOT_READNONE]]
340 // HAS_ERRNO: declare fp128 @fmaf128(fp128, fp128, fp128) [[NOT_READNONE]]
341 
342 // On GNU or Win, fma never sets errno, so we can convert to the intrinsic.
343 
344 // HAS_ERRNO_GNU: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC:#[0-9]+]]
345 // HAS_ERRNO_GNU: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
346 // HAS_ERRNO_GNU: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
347 
348 // HAS_ERRNO_ANDROID: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC:#[0-9]+]]
349 // HAS_ERRNO_ANDROID: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
350 // HAS_ERRNO_ANDROID: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
351 
352 // HAS_ERRNO_WIN: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC:#[0-9]+]]
353 // HAS_ERRNO_WIN: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
354 // Long double is just double on win, so no f80 use/declaration.
355 // HAS_ERRNO_WIN-NOT: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80)
356 
357 __builtin_fmax(f,f);       __builtin_fmaxf(f,f);      __builtin_fmaxl(f,f); __builtin_fmaxf128(f,f);
358 
359 // NO__ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
360 // NO__ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
361 // NO__ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
362 // NO__ERRNO: declare fp128 @llvm.maxnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
363 // HAS_ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
364 // HAS_ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
365 // HAS_ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
366 // HAS_ERRNO: declare fp128 @llvm.maxnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
367 
368 __builtin_fmin(f,f);       __builtin_fminf(f,f);      __builtin_fminl(f,f); __builtin_fminf128(f,f);
369 
370 // NO__ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
371 // NO__ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
372 // NO__ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
373 // NO__ERRNO: declare fp128 @llvm.minnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
374 // HAS_ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
375 // HAS_ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
376 // HAS_ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
377 // HAS_ERRNO: declare fp128 @llvm.minnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
378 
379 __builtin_hypot(f,f);      __builtin_hypotf(f,f);     __builtin_hypotl(f,f); __builtin_hypotf128(f,f);
380 
381 // NO__ERRNO: declare double @hypot(double, double) [[READNONE]]
382 // NO__ERRNO: declare float @hypotf(float, float) [[READNONE]]
383 // NO__ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[READNONE]]
384 // NO__ERRNO: declare fp128 @hypotf128(fp128, fp128) [[READNONE]]
385 // HAS_ERRNO: declare double @hypot(double, double) [[NOT_READNONE]]
386 // HAS_ERRNO: declare float @hypotf(float, float) [[NOT_READNONE]]
387 // HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NOT_READNONE]]
388 // HAS_ERRNO: declare fp128 @hypotf128(fp128, fp128) [[NOT_READNONE]]
389 
390 __builtin_ilogb(f);      __builtin_ilogbf(f);     __builtin_ilogbl(f); __builtin_ilogbf128(f);
391 
392 // NO__ERRNO: declare i32 @ilogb(double) [[READNONE]]
393 // NO__ERRNO: declare i32 @ilogbf(float) [[READNONE]]
394 // NO__ERRNO: declare i32 @ilogbl(x86_fp80) [[READNONE]]
395 // NO__ERRNO: declare i32 @ilogbf128(fp128) [[READNONE]]
396 // HAS_ERRNO: declare i32 @ilogb(double) [[NOT_READNONE]]
397 // HAS_ERRNO: declare i32 @ilogbf(float) [[NOT_READNONE]]
398 // HAS_ERRNO: declare i32 @ilogbl(x86_fp80) [[NOT_READNONE]]
399 // HAS_ERRNO: declare i32 @ilogbf128(fp128) [[NOT_READNONE]]
400 
401 __builtin_lgamma(f);     __builtin_lgammaf(f);    __builtin_lgammal(f); __builtin_lgammaf128(f);
402 
403 // NO__ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
404 // NO__ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
405 // NO__ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
406 // NO__ERRNO: declare fp128 @lgammaf128(fp128) [[NOT_READNONE]]
407 // HAS_ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
408 // HAS_ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
409 // HAS_ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
410 // HAS_ERRNO: declare fp128 @lgammaf128(fp128) [[NOT_READNONE]]
411 
412 __builtin_llrint(f);     __builtin_llrintf(f);    __builtin_llrintl(f); __builtin_llrintf128(f);
413 
414 // NO__ERRNO: declare i64 @llvm.llrint.i64.f64(double) [[READNONE_INTRINSIC]]
415 // NO__ERRNO: declare i64 @llvm.llrint.i64.f32(float) [[READNONE_INTRINSIC]]
416 // NO__ERRNO: declare i64 @llvm.llrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
417 // NO__ERRNO: declare i64 @llvm.llrint.i64.f128(fp128) [[READNONE_INTRINSIC]]
418 // HAS_ERRNO: declare i64 @llrint(double) [[NOT_READNONE]]
419 // HAS_ERRNO: declare i64 @llrintf(float) [[NOT_READNONE]]
420 // HAS_ERRNO: declare i64 @llrintl(x86_fp80) [[NOT_READNONE]]
421 // HAS_ERRNO: declare i64 @llrintf128(fp128) [[NOT_READNONE]]
422 
423 __builtin_llround(f);    __builtin_llroundf(f);   __builtin_llroundl(f); __builtin_llroundf128(f);
424 
425 // NO__ERRNO: declare i64 @llvm.llround.i64.f64(double) [[READNONE_INTRINSIC]]
426 // NO__ERRNO: declare i64 @llvm.llround.i64.f32(float) [[READNONE_INTRINSIC]]
427 // NO__ERRNO: declare i64 @llvm.llround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
428 // NO__ERRNO: declare i64 @llvm.llround.i64.f128(fp128) [[READNONE_INTRINSIC]]
429 // HAS_ERRNO: declare i64 @llround(double) [[NOT_READNONE]]
430 // HAS_ERRNO: declare i64 @llroundf(float) [[NOT_READNONE]]
431 // HAS_ERRNO: declare i64 @llroundl(x86_fp80) [[NOT_READNONE]]
432 // HAS_ERRNO: declare i64 @llroundf128(fp128) [[NOT_READNONE]]
433 
434 __builtin_log(f);        __builtin_logf(f);       __builtin_logl(f); __builtin_logf128(f);
435 
436 // NO__ERRNO: declare double @llvm.log.f64(double) [[READNONE_INTRINSIC]]
437 // NO__ERRNO: declare float @llvm.log.f32(float) [[READNONE_INTRINSIC]]
438 // NO__ERRNO: declare x86_fp80 @llvm.log.f80(x86_fp80) [[READNONE_INTRINSIC]]
439 // NO__ERRNO: declare fp128 @llvm.log.f128(fp128) [[READNONE_INTRINSIC]]
440 // HAS_ERRNO: declare double @log(double) [[NOT_READNONE]]
441 // HAS_ERRNO: declare float @logf(float) [[NOT_READNONE]]
442 // HAS_ERRNO: declare x86_fp80 @logl(x86_fp80) [[NOT_READNONE]]
443 // HAS_ERRNO: declare fp128 @logf128(fp128) [[NOT_READNONE]]
444 
445 __builtin_log10(f);      __builtin_log10f(f);     __builtin_log10l(f); __builtin_log10f128(f);
446 
447 // NO__ERRNO: declare double @llvm.log10.f64(double) [[READNONE_INTRINSIC]]
448 // NO__ERRNO: declare float @llvm.log10.f32(float) [[READNONE_INTRINSIC]]
449 // NO__ERRNO: declare x86_fp80 @llvm.log10.f80(x86_fp80) [[READNONE_INTRINSIC]]
450 // NO__ERRNO: declare fp128 @llvm.log10.f128(fp128) [[READNONE_INTRINSIC]]
451 // HAS_ERRNO: declare double @log10(double) [[NOT_READNONE]]
452 // HAS_ERRNO: declare float @log10f(float) [[NOT_READNONE]]
453 // HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80) [[NOT_READNONE]]
454 // HAS_ERRNO: declare fp128 @log10f128(fp128) [[NOT_READNONE]]
455 
456 __builtin_log1p(f);      __builtin_log1pf(f);     __builtin_log1pl(f); __builtin_log1pf128(f);
457 
458 // NO__ERRNO: declare double @log1p(double) [[READNONE]]
459 // NO__ERRNO: declare float @log1pf(float) [[READNONE]]
460 // NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[READNONE]]
461 // NO__ERRNO: declare fp128 @log1pf128(fp128) [[READNONE]]
462 // HAS_ERRNO: declare double @log1p(double) [[NOT_READNONE]]
463 // HAS_ERRNO: declare float @log1pf(float) [[NOT_READNONE]]
464 // HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[NOT_READNONE]]
465 // HAS_ERRNO: declare fp128 @log1pf128(fp128) [[NOT_READNONE]]
466 
467 __builtin_log2(f);       __builtin_log2f(f);      __builtin_log2l(f); __builtin_log2f128(f);
468 
469 // NO__ERRNO: declare double @llvm.log2.f64(double) [[READNONE_INTRINSIC]]
470 // NO__ERRNO: declare float @llvm.log2.f32(float) [[READNONE_INTRINSIC]]
471 // NO__ERRNO: declare x86_fp80 @llvm.log2.f80(x86_fp80) [[READNONE_INTRINSIC]]
472 // NO__ERRNO: declare fp128 @llvm.log2.f128(fp128) [[READNONE_INTRINSIC]]
473 // HAS_ERRNO: declare double @log2(double) [[NOT_READNONE]]
474 // HAS_ERRNO: declare float @log2f(float) [[NOT_READNONE]]
475 // HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80) [[NOT_READNONE]]
476 // HAS_ERRNO: declare fp128 @log2f128(fp128) [[NOT_READNONE]]
477 
478 __builtin_logb(f);       __builtin_logbf(f);      __builtin_logbl(f); __builtin_logbf128(f);
479 
480 // NO__ERRNO: declare double @logb(double) [[READNONE]]
481 // NO__ERRNO: declare float @logbf(float) [[READNONE]]
482 // NO__ERRNO: declare x86_fp80 @logbl(x86_fp80) [[READNONE]]
483 // NO__ERRNO: declare fp128 @logbf128(fp128) [[READNONE]]
484 // HAS_ERRNO: declare double @logb(double) [[NOT_READNONE]]
485 // HAS_ERRNO: declare float @logbf(float) [[NOT_READNONE]]
486 // HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80) [[NOT_READNONE]]
487 // HAS_ERRNO: declare fp128 @logbf128(fp128) [[NOT_READNONE]]
488 
489 __builtin_lrint(f);      __builtin_lrintf(f);     __builtin_lrintl(f); __builtin_lrintf128(f);
490 
491 // NO__ERRNO: declare i64 @llvm.lrint.i64.f64(double) [[READNONE_INTRINSIC]]
492 // NO__ERRNO: declare i64 @llvm.lrint.i64.f32(float) [[READNONE_INTRINSIC]]
493 // NO__ERRNO: declare i64 @llvm.lrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
494 // NO__ERRNO: declare i64 @llvm.lrint.i64.f128(fp128) [[READNONE_INTRINSIC]]
495 // HAS_ERRNO: declare i64 @lrint(double) [[NOT_READNONE]]
496 // HAS_ERRNO: declare i64 @lrintf(float) [[NOT_READNONE]]
497 // HAS_ERRNO: declare i64 @lrintl(x86_fp80) [[NOT_READNONE]]
498 // HAS_ERRNO: declare i64 @lrintf128(fp128) [[NOT_READNONE]]
499 
500 __builtin_lround(f);     __builtin_lroundf(f);    __builtin_lroundl(f);  __builtin_lroundf128(f);
501 
502 // NO__ERRNO: declare i64 @llvm.lround.i64.f64(double) [[READNONE_INTRINSIC]]
503 // NO__ERRNO: declare i64 @llvm.lround.i64.f32(float) [[READNONE_INTRINSIC]]
504 // NO__ERRNO: declare i64 @llvm.lround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
505 // NO__ERRNO: declare i64 @llvm.lround.i64.f128(fp128) [[READNONE_INTRINSIC]]
506 // HAS_ERRNO: declare i64 @lround(double) [[NOT_READNONE]]
507 // HAS_ERRNO: declare i64 @lroundf(float) [[NOT_READNONE]]
508 // HAS_ERRNO: declare i64 @lroundl(x86_fp80) [[NOT_READNONE]]
509 // HAS_ERRNO: declare i64 @lroundf128(fp128) [[NOT_READNONE]]
510 
511 __builtin_nearbyint(f);  __builtin_nearbyintf(f); __builtin_nearbyintl(f); __builtin_nearbyintf128(f);
512 
513 // NO__ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
514 // NO__ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
515 // NO__ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
516 // NO__ERRNO: declare fp128 @llvm.nearbyint.f128(fp128) [[READNONE_INTRINSIC]]
517 // HAS_ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
518 // HAS_ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
519 // HAS_ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
520 // HAS_ERRNO: declare fp128 @llvm.nearbyint.f128(fp128) [[READNONE_INTRINSIC]]
521 
522 __builtin_nextafter(f,f);  __builtin_nextafterf(f,f); __builtin_nextafterl(f,f); __builtin_nextafterf128(f,f);
523 
524 // NO__ERRNO: declare double @nextafter(double, double) [[READNONE]]
525 // NO__ERRNO: declare float @nextafterf(float, float) [[READNONE]]
526 // NO__ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[READNONE]]
527 // NO__ERRNO: declare fp128 @nextafterf128(fp128, fp128) [[READNONE]]
528 // HAS_ERRNO: declare double @nextafter(double, double) [[NOT_READNONE]]
529 // HAS_ERRNO: declare float @nextafterf(float, float) [[NOT_READNONE]]
530 // HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[NOT_READNONE]]
531 // HAS_ERRNO: declare fp128 @nextafterf128(fp128, fp128) [[NOT_READNONE]]
532 
533 __builtin_nexttoward(f,f); __builtin_nexttowardf(f,f);__builtin_nexttowardl(f,f); __builtin_nexttowardf128(f,f);
534 
535 // NO__ERRNO: declare double @nexttoward(double, x86_fp80) [[READNONE]]
536 // NO__ERRNO: declare float @nexttowardf(float, x86_fp80) [[READNONE]]
537 // NO__ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[READNONE]]
538 // NO__ERRNO: declare fp128 @nexttowardf128(fp128, fp128) [[READNONE]]
539 // HAS_ERRNO: declare double @nexttoward(double, x86_fp80) [[NOT_READNONE]]
540 // HAS_ERRNO: declare float @nexttowardf(float, x86_fp80) [[NOT_READNONE]]
541 // HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[NOT_READNONE]]
542 // HAS_ERRNO: declare fp128 @nexttowardf128(fp128, fp128) [[NOT_READNONE]]
543 
544 __builtin_remainder(f,f);  __builtin_remainderf(f,f); __builtin_remainderl(f,f); __builtin_remainderf128(f,f);
545 
546 // NO__ERRNO: declare double @remainder(double, double) [[READNONE]]
547 // NO__ERRNO: declare float @remainderf(float, float) [[READNONE]]
548 // NO__ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[READNONE]]
549 // NO__ERRNO: declare fp128 @remainderf128(fp128, fp128) [[READNONE]]
550 // HAS_ERRNO: declare double @remainder(double, double) [[NOT_READNONE]]
551 // HAS_ERRNO: declare float @remainderf(float, float) [[NOT_READNONE]]
552 // HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[NOT_READNONE]]
553 // HAS_ERRNO: declare fp128 @remainderf128(fp128, fp128) [[NOT_READNONE]]
554 
555 __builtin_remquo(f,f,i);  __builtin_remquof(f,f,i); __builtin_remquol(f,f,i); __builtin_remquof128(f,f,i);
556 
557 // NO__ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
558 // NO__ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
559 // NO__ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
560 // NO__ERRNO: declare fp128 @remquof128(fp128, fp128, i32*) [[NOT_READNONE]]
561 // HAS_ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
562 // HAS_ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
563 // HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
564 // HAS_ERRNO: declare fp128 @remquof128(fp128, fp128, i32*) [[NOT_READNONE]]
565 
566 __builtin_rint(f);       __builtin_rintf(f);      __builtin_rintl(f); __builtin_rintf128(f);
567 
568 // NO__ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
569 // NO__ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
570 // NO__ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
571 // NO__ERRNO: declare fp128 @llvm.rint.f128(fp128) [[READNONE_INTRINSIC]]
572 // HAS_ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
573 // HAS_ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
574 // HAS_ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
575 // HAS_ERRNO: declare fp128 @llvm.rint.f128(fp128) [[READNONE_INTRINSIC]]
576 
577 __builtin_round(f);      __builtin_roundf(f);     __builtin_roundl(f); __builtin_roundf128(f);
578 
579 // NO__ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
580 // NO__ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
581 // NO__ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
582 // NO__ERRNO: declare fp128 @llvm.round.f128(fp128) [[READNONE_INTRINSIC]]
583 // HAS_ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
584 // HAS_ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
585 // HAS_ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
586 // HAS_ERRNO: declare fp128 @llvm.round.f128(fp128) [[READNONE_INTRINSIC]]
587 
588 __builtin_scalbln(f,f);    __builtin_scalblnf(f,f);   __builtin_scalblnl(f,f); __builtin_scalblnf128(f,f);
589 
590 // NO__ERRNO: declare double @scalbln(double, i64) [[READNONE]]
591 // NO__ERRNO: declare float @scalblnf(float, i64) [[READNONE]]
592 // NO__ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[READNONE]]
593 // NO__ERRNO: declare fp128 @scalblnf128(fp128, i64) [[READNONE]]
594 // HAS_ERRNO: declare double @scalbln(double, i64) [[NOT_READNONE]]
595 // HAS_ERRNO: declare float @scalblnf(float, i64) [[NOT_READNONE]]
596 // HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[NOT_READNONE]]
597 // HAS_ERRNO: declare fp128 @scalblnf128(fp128, i64) [[NOT_READNONE]]
598 
599 __builtin_scalbn(f,f);     __builtin_scalbnf(f,f);    __builtin_scalbnl(f,f); __builtin_scalbnf128(f,f);
600 
601 // NO__ERRNO: declare double @scalbn(double, i32) [[READNONE]]
602 // NO__ERRNO: declare float @scalbnf(float, i32) [[READNONE]]
603 // NO__ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[READNONE]]
604 // NO__ERRNO: declare fp128 @scalbnf128(fp128, i32) [[READNONE]]
605 // HAS_ERRNO: declare double @scalbn(double, i32) [[NOT_READNONE]]
606 // HAS_ERRNO: declare float @scalbnf(float, i32) [[NOT_READNONE]]
607 // HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[NOT_READNONE]]
608 // HAS_ERRNO: declare fp128 @scalbnf128(fp128, i32) [[NOT_READNONE]]
609 
610 __builtin_sin(f);        __builtin_sinf(f);       __builtin_sinl(f); __builtin_sinf128(f);
611 
612 // NO__ERRNO: declare double @llvm.sin.f64(double) [[READNONE_INTRINSIC]]
613 // NO__ERRNO: declare float @llvm.sin.f32(float) [[READNONE_INTRINSIC]]
614 // NO__ERRNO: declare x86_fp80 @llvm.sin.f80(x86_fp80) [[READNONE_INTRINSIC]]
615 // NO__ERRNO: declare fp128 @llvm.sin.f128(fp128) [[READNONE_INTRINSIC]]
616 // HAS_ERRNO: declare double @sin(double) [[NOT_READNONE]]
617 // HAS_ERRNO: declare float @sinf(float) [[NOT_READNONE]]
618 // HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[NOT_READNONE]]
619 // HAS_ERRNO: declare fp128 @sinf128(fp128) [[NOT_READNONE]]
620 
621 __builtin_sinh(f);       __builtin_sinhf(f);      __builtin_sinhl(f); __builtin_sinhf128(f);
622 
623 // NO__ERRNO: declare double @sinh(double) [[READNONE]]
624 // NO__ERRNO: declare float @sinhf(float) [[READNONE]]
625 // NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[READNONE]]
626 // NO__ERRNO: declare fp128 @sinhf128(fp128) [[READNONE]]
627 // HAS_ERRNO: declare double @sinh(double) [[NOT_READNONE]]
628 // HAS_ERRNO: declare float @sinhf(float) [[NOT_READNONE]]
629 // HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[NOT_READNONE]]
630 // HAS_ERRNO: declare fp128 @sinhf128(fp128) [[NOT_READNONE]]
631 
632 __builtin_sqrt(f);       __builtin_sqrtf(f);      __builtin_sqrtl(f); __builtin_sqrtf128(f);
633 
634 // NO__ERRNO: declare double @llvm.sqrt.f64(double) [[READNONE_INTRINSIC]]
635 // NO__ERRNO: declare float @llvm.sqrt.f32(float) [[READNONE_INTRINSIC]]
636 // NO__ERRNO: declare x86_fp80 @llvm.sqrt.f80(x86_fp80) [[READNONE_INTRINSIC]]
637 // NO__ERRNO: declare fp128 @llvm.sqrt.f128(fp128) [[READNONE_INTRINSIC]]
638 // HAS_ERRNO: declare double @sqrt(double) [[NOT_READNONE]]
639 // HAS_ERRNO: declare float @sqrtf(float) [[NOT_READNONE]]
640 // HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NOT_READNONE]]
641 // HAS_ERRNO: declare fp128 @sqrtf128(fp128) [[NOT_READNONE]]
642 
643 __builtin_tan(f);        __builtin_tanf(f);       __builtin_tanl(f); __builtin_tanf128(f);
644 
645 // NO__ERRNO: declare double @tan(double) [[READNONE]]
646 // NO__ERRNO: declare float @tanf(float) [[READNONE]]
647 // NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[READNONE]]
648 // NO__ERRNO: declare fp128 @tanf128(fp128) [[READNONE]]
649 // HAS_ERRNO: declare double @tan(double) [[NOT_READNONE]]
650 // HAS_ERRNO: declare float @tanf(float) [[NOT_READNONE]]
651 // HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[NOT_READNONE]]
652 // HAS_ERRNO: declare fp128 @tanf128(fp128) [[NOT_READNONE]]
653 
654 __builtin_tanh(f);       __builtin_tanhf(f);      __builtin_tanhl(f); __builtin_tanhf128(f);
655 
656 // NO__ERRNO: declare double @tanh(double) [[READNONE]]
657 // NO__ERRNO: declare float @tanhf(float) [[READNONE]]
658 // NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[READNONE]]
659 // NO__ERRNO: declare fp128 @tanhf128(fp128) [[READNONE]]
660 // HAS_ERRNO: declare double @tanh(double) [[NOT_READNONE]]
661 // HAS_ERRNO: declare float @tanhf(float) [[NOT_READNONE]]
662 // HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[NOT_READNONE]]
663 // HAS_ERRNO: declare fp128 @tanhf128(fp128) [[NOT_READNONE]]
664 
665 __builtin_tgamma(f);     __builtin_tgammaf(f);    __builtin_tgammal(f); __builtin_tgammaf128(f);
666 
667 // NO__ERRNO: declare double @tgamma(double) [[READNONE]]
668 // NO__ERRNO: declare float @tgammaf(float) [[READNONE]]
669 // NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[READNONE]]
670 // NO__ERRNO: declare fp128 @tgammaf128(fp128) [[READNONE]]
671 // HAS_ERRNO: declare double @tgamma(double) [[NOT_READNONE]]
672 // HAS_ERRNO: declare float @tgammaf(float) [[NOT_READNONE]]
673 // HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[NOT_READNONE]]
674 // HAS_ERRNO: declare fp128 @tgammaf128(fp128) [[NOT_READNONE]]
675 
676 __builtin_trunc(f);      __builtin_truncf(f);     __builtin_truncl(f); __builtin_truncf128(f);
677 
678 // NO__ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
679 // NO__ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
680 // NO__ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
681 // NO__ERRNO: declare fp128 @llvm.trunc.f128(fp128) [[READNONE_INTRINSIC]]
682 // HAS_ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
683 // HAS_ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
684 // HAS_ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
685 // HAS_ERRNO: declare fp128 @llvm.trunc.f128(fp128) [[READNONE_INTRINSIC]]
686 };
687 
688 // NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
689 // NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
690 // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
691 // NO__ERRNO: attributes [[PURE]] = { {{.*}}readonly{{.*}} }
692 
693 // HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
694 // HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
695 // HAS_ERRNO: attributes [[PURE]] = { {{.*}}readonly{{.*}} }
696 // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }
697 
698 // HAS_ERRNO_GNU: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
699 // HAS_ERRNO_ANDROID: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
700 // HAS_ERRNO_WIN: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }
701 
702