1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -o - -emit-llvm %s | FileCheck %s --check-prefixes=COMMON,NO__ERRNO
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefixes=COMMON,HAS_ERRNO
3 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -o - -emit-llvm -disable-llvm-passes -O2 %s | FileCheck %s --check-prefixes=COMMON,NO__ERRNO
4 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -o - -emit-llvm -disable-llvm-passes -O2 -fmath-errno %s | FileCheck %s --check-prefixes=COMMON,HAS_ERRNO
5 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -o - -emit-llvm -ffp-exception-behavior=maytrap %s | FileCheck %s --check-prefixes=COMMON,HAS_MAYTRAP
6 // RUN: %clang_cc1 -triple x86_64-unknown-unknown-gnu -Wno-implicit-function-declaration -w -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_GNU
7 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -Wno-implicit-function-declaration -w -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_WIN
9 // Test attributes and builtin codegen of math library calls.
11 void foo(double *d
, float f
, float *fp
, long double *l
, int *i
, const char *c
) {
12 f
= fmod(f
,f
); f
= fmodf(f
,f
); f
= fmodl(f
,f
);
14 // NO__ERRNO: frem double
15 // NO__ERRNO: frem float
16 // NO__ERRNO: frem x86_fp80
17 // HAS_ERRNO: declare double @fmod(double noundef, double noundef) [[NOT_READNONE:#[0-9]+]]
18 // HAS_ERRNO: declare float @fmodf(float noundef, float noundef) [[NOT_READNONE]]
19 // HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
20 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.frem.f64(
21 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.frem.f32(
22 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.frem.f80(
24 atan2(f
,f
); atan2f(f
,f
) ; atan2l(f
, f
);
26 // NO__ERRNO: declare double @llvm.atan2.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
27 // NO__ERRNO: declare float @llvm.atan2.f32(float, float) [[READNONE_INTRINSIC]]
28 // NO__ERRNO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
29 // HAS_ERRNO: declare double @atan2(double noundef, double noundef) [[NOT_READNONE]]
30 // HAS_ERRNO: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]]
31 // HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
32 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.atan2.f64(
33 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.atan2.f32(
34 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.atan2.f80(
36 copysign(f
,f
); copysignf(f
,f
);copysignl(f
,f
);
38 // NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC]]
39 // NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
40 // NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
41 // HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
42 // HAS_ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
43 // HAS_ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
44 // HAS_MAYTRAP: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
45 // HAS_MAYTRAP: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
46 // HAS_MAYTRAP: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
48 fabs(f
); fabsf(f
); fabsl(f
);
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 // HAS_MAYTRAP: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]]
57 // HAS_MAYTRAP: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]]
58 // HAS_MAYTRAP: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
60 frexp(f
,i
); frexpf(f
,i
); frexpl(f
,i
);
62 // NO__ERRNO: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE:#[0-9]+]]
63 // NO__ERRNO: declare float @frexpf(float noundef, ptr noundef) [[NOT_READNONE]]
64 // NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
65 // HAS_ERRNO: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE]]
66 // HAS_ERRNO: declare float @frexpf(float noundef, ptr noundef) [[NOT_READNONE]]
67 // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
68 // HAS_MAYTRAP: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE:#[0-9]+]]
69 // HAS_MAYTRAP: declare float @frexpf(float noundef, ptr noundef) [[NOT_READNONE]]
70 // HAS_MAYTRAP: declare x86_fp80 @frexpl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
72 ldexp(f
,f
); ldexpf(f
,f
); ldexpl(f
,f
);
74 // NO__ERRNO: declare double @ldexp(double noundef, i32 noundef) [[READNONE:#[0-9]+]]
75 // NO__ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[READNONE]]
76 // NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[READNONE]]
77 // HAS_ERRNO: declare double @ldexp(double noundef, i32 noundef) [[NOT_READNONE]]
78 // HAS_ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[NOT_READNONE]]
79 // HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]]
80 // HAS_MAYTRAP: declare double @ldexp(double noundef, i32 noundef) [[NOT_READNONE]]
81 // HAS_MAYTRAP: declare float @ldexpf(float noundef, i32 noundef) [[NOT_READNONE]]
82 // HAS_MAYTRAP: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]]
84 modf(f
,d
); modff(f
,fp
); modfl(f
,l
);
86 // NO__ERRNO: declare double @modf(double noundef, ptr noundef) [[NOT_READNONE]]
87 // NO__ERRNO: declare float @modff(float noundef, ptr noundef) [[NOT_READNONE]]
88 // NO__ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
89 // HAS_ERRNO: declare double @modf(double noundef, ptr noundef) [[NOT_READNONE]]
90 // HAS_ERRNO: declare float @modff(float noundef, ptr noundef) [[NOT_READNONE]]
91 // HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
92 // HAS_MAYTRAP: declare double @modf(double noundef, ptr noundef) [[NOT_READNONE]]
93 // HAS_MAYTRAP: declare float @modff(float noundef, ptr noundef) [[NOT_READNONE]]
94 // HAS_MAYTRAP: declare x86_fp80 @modfl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
96 nan(c
); nanf(c
); nanl(c
);
98 // NO__ERRNO: declare double @nan(ptr noundef) [[READONLY:#[0-9]+]]
99 // NO__ERRNO: declare float @nanf(ptr noundef) [[READONLY]]
100 // NO__ERRNO: declare x86_fp80 @nanl(ptr noundef) [[READONLY]]
101 // HAS_ERRNO: declare double @nan(ptr noundef) [[READONLY:#[0-9]+]]
102 // HAS_ERRNO: declare float @nanf(ptr noundef) [[READONLY]]
103 // HAS_ERRNO: declare x86_fp80 @nanl(ptr noundef) [[READONLY]]
104 // HAS_MAYTRAP: declare double @nan(ptr noundef) [[READONLY:#[0-9]+]]
105 // HAS_MAYTRAP: declare float @nanf(ptr noundef) [[READONLY]]
106 // HAS_MAYTRAP: declare x86_fp80 @nanl(ptr noundef) [[READONLY]]
108 pow(f
,f
); powf(f
,f
); powl(f
,f
);
110 // NO__ERRNO: declare double @llvm.pow.f64(double, double) [[READNONE_INTRINSIC]]
111 // NO__ERRNO: declare float @llvm.pow.f32(float, float) [[READNONE_INTRINSIC]]
112 // NO__ERRNO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
113 // HAS_ERRNO: declare double @pow(double noundef, double noundef) [[NOT_READNONE]]
114 // HAS_ERRNO: declare float @powf(float noundef, float noundef) [[NOT_READNONE]]
115 // HAS_ERRNO: declare x86_fp80 @powl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
116 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.pow.f64(
117 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.pow.f32(
118 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.pow.f80({{.*}})
122 acos(f
); acosf(f
); acosl(f
);
124 // NO__ERRNO: declare double @llvm.acos.f64(double) [[READNONE_INTRINSIC]]
125 // NO__ERRNO: declare float @llvm.acos.f32(float) [[READNONE_INTRINSIC]]
126 // NO__ERRNO: declare x86_fp80 @llvm.acos.f80(x86_fp80) [[READNONE_INTRINSIC]]
127 // HAS_ERRNO: declare double @acos(double noundef) [[NOT_READNONE]]
128 // HAS_ERRNO: declare float @acosf(float noundef) [[NOT_READNONE]]
129 // HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80 noundef) [[NOT_READNONE]]
130 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.acos.f64(
131 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.acos.f32(
132 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.acos.f80(
135 acosh(f
); acoshf(f
); acoshl(f
);
137 // NO__ERRNO: declare double @acosh(double noundef) [[READNONE]]
138 // NO__ERRNO: declare float @acoshf(float noundef) [[READNONE]]
139 // NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80 noundef) [[READNONE]]
140 // HAS_ERRNO: declare double @acosh(double noundef) [[NOT_READNONE]]
141 // HAS_ERRNO: declare float @acoshf(float noundef) [[NOT_READNONE]]
142 // HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80 noundef) [[NOT_READNONE]]
143 // HAS_MAYTRAP: declare double @acosh(double noundef) [[NOT_READNONE]]
144 // HAS_MAYTRAP: declare float @acoshf(float noundef) [[NOT_READNONE]]
145 // HAS_MAYTRAP: declare x86_fp80 @acoshl(x86_fp80 noundef) [[NOT_READNONE]]
147 asin(f
); asinf(f
); asinl(f
);
149 // NO__ERRNO: declare double @llvm.asin.f64(double) [[READNONE_INTRINSIC]]
150 // NO__ERRNO: declare float @llvm.asin.f32(float) [[READNONE_INTRINSIC]]
151 // NO__ERRNO: declare x86_fp80 @llvm.asin.f80(x86_fp80) [[READNONE_INTRINSIC]]
152 // HAS_ERRNO: declare double @asin(double noundef) [[NOT_READNONE]]
153 // HAS_ERRNO: declare float @asinf(float noundef) [[NOT_READNONE]]
154 // HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80 noundef) [[NOT_READNONE]]
155 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.asin.f64(
156 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.asin.f32(
157 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.asin.f80(
159 asinh(f
); asinhf(f
); asinhl(f
);
161 // NO__ERRNO: declare double @asinh(double noundef) [[READNONE]]
162 // NO__ERRNO: declare float @asinhf(float noundef) [[READNONE]]
163 // NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80 noundef) [[READNONE]]
164 // HAS_ERRNO: declare double @asinh(double noundef) [[NOT_READNONE]]
165 // HAS_ERRNO: declare float @asinhf(float noundef) [[NOT_READNONE]]
166 // HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80 noundef) [[NOT_READNONE]]
167 // HAS_MAYTRAP: declare double @asinh(double noundef) [[NOT_READNONE]]
168 // HAS_MAYTRAP: declare float @asinhf(float noundef) [[NOT_READNONE]]
169 // HAS_MAYTRAP: declare x86_fp80 @asinhl(x86_fp80 noundef) [[NOT_READNONE]]
171 atan(f
); atanf(f
); atanl(f
);
173 // NO__ERRNO: declare double @llvm.atan.f64(double) [[READNONE_INTRINSIC]]
174 // NO__ERRNO: declare float @llvm.atan.f32(float) [[READNONE_INTRINSIC]]
175 // NO__ERRNO: declare x86_fp80 @llvm.atan.f80(x86_fp80) [[READNONE_INTRINSIC]]
176 // HAS_ERRNO: declare double @atan(double noundef) [[NOT_READNONE]]
177 // HAS_ERRNO: declare float @atanf(float noundef) [[NOT_READNONE]]
178 // HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80 noundef) [[NOT_READNONE]]
179 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.atan.f64(
180 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.atan.f32(
181 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.atan.f80(
183 atanh(f
); atanhf(f
); atanhl(f
);
185 // NO__ERRNO: declare double @atanh(double noundef) [[READNONE]]
186 // NO__ERRNO: declare float @atanhf(float noundef) [[READNONE]]
187 // NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80 noundef) [[READNONE]]
188 // HAS_ERRNO: declare double @atanh(double noundef) [[NOT_READNONE]]
189 // HAS_ERRNO: declare float @atanhf(float noundef) [[NOT_READNONE]]
190 // HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80 noundef) [[NOT_READNONE]]
191 // HAS_MAYTRAP: declare double @atanh(double noundef) [[NOT_READNONE]]
192 // HAS_MAYTRAP: declare float @atanhf(float noundef) [[NOT_READNONE]]
193 // HAS_MAYTRAP: declare x86_fp80 @atanhl(x86_fp80 noundef) [[NOT_READNONE]]
195 cbrt(f
); cbrtf(f
); cbrtl(f
);
197 // NO__ERRNO: declare double @cbrt(double noundef) [[READNONE]]
198 // NO__ERRNO: declare float @cbrtf(float noundef) [[READNONE]]
199 // NO__ERRNO: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[READNONE]]
200 // HAS_ERRNO: declare double @cbrt(double noundef) [[READNONE:#[0-9]+]]
201 // HAS_ERRNO: declare float @cbrtf(float noundef) [[READNONE]]
202 // HAS_ERRNO: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[READNONE]]
203 // HAS_MAYTRAP: declare double @cbrt(double noundef) [[READNONE:#[0-9]+]]
204 // HAS_MAYTRAP: declare float @cbrtf(float noundef) [[READNONE]]
205 // HAS_MAYTRAP: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[READNONE]]
207 ceil(f
); ceilf(f
); ceill(f
);
209 // NO__ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
210 // NO__ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
211 // NO__ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
212 // HAS_ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
213 // HAS_ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
214 // HAS_ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
215 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.ceil.f64(
216 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.ceil.f32(
217 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.ceil.f80(
219 cos(f
); cosf(f
); cosl(f
);
221 // NO__ERRNO: declare double @llvm.cos.f64(double) [[READNONE_INTRINSIC]]
222 // NO__ERRNO: declare float @llvm.cos.f32(float) [[READNONE_INTRINSIC]]
223 // NO__ERRNO: declare x86_fp80 @llvm.cos.f80(x86_fp80) [[READNONE_INTRINSIC]]
224 // HAS_ERRNO: declare double @cos(double noundef) [[NOT_READNONE]]
225 // HAS_ERRNO: declare float @cosf(float noundef) [[NOT_READNONE]]
226 // HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80 noundef) [[NOT_READNONE]]
227 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.cos.f64(
228 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.cos.f32(
229 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.cos.f80(
231 cosh(f
); coshf(f
); coshl(f
);
233 // NO__ERRNO: declare double @llvm.cosh.f64(double) [[READNONE_INTRINSIC]]
234 // NO__ERRNO: declare float @llvm.cosh.f32(float) [[READNONE_INTRINSIC]]
235 // NO__ERRNO: declare x86_fp80 @llvm.cosh.f80(x86_fp80) [[READNONE_INTRINSIC]]
236 // HAS_ERRNO: declare double @cosh(double noundef) [[NOT_READNONE]]
237 // HAS_ERRNO: declare float @coshf(float noundef) [[NOT_READNONE]]
238 // HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80 noundef) [[NOT_READNONE]]
239 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.cosh.f64(
240 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.cosh.f32(
241 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.cosh.f80(
243 erf(f
); erff(f
); erfl(f
);
245 // NO__ERRNO: declare double @erf(double noundef) [[READNONE]]
246 // NO__ERRNO: declare float @erff(float noundef) [[READNONE]]
247 // NO__ERRNO: declare x86_fp80 @erfl(x86_fp80 noundef) [[READNONE]]
248 // HAS_ERRNO: declare double @erf(double noundef) [[NOT_READNONE]]
249 // HAS_ERRNO: declare float @erff(float noundef) [[NOT_READNONE]]
250 // HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80 noundef) [[NOT_READNONE]]
251 // HAS_MAYTRAP: declare double @erf(double noundef) [[NOT_READNONE]]
252 // HAS_MAYTRAP: declare float @erff(float noundef) [[NOT_READNONE]]
253 // HAS_MAYTRAP: declare x86_fp80 @erfl(x86_fp80 noundef) [[NOT_READNONE]]
255 erfc(f
); erfcf(f
); erfcl(f
);
257 // NO__ERRNO: declare double @erfc(double noundef) [[READNONE]]
258 // NO__ERRNO: declare float @erfcf(float noundef) [[READNONE]]
259 // NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80 noundef) [[READNONE]]
260 // HAS_ERRNO: declare double @erfc(double noundef) [[NOT_READNONE]]
261 // HAS_ERRNO: declare float @erfcf(float noundef) [[NOT_READNONE]]
262 // HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80 noundef) [[NOT_READNONE]]
263 // HAS_MAYTRAP: declare double @erfc(double noundef) [[NOT_READNONE]]
264 // HAS_MAYTRAP: declare float @erfcf(float noundef) [[NOT_READNONE]]
265 // HAS_MAYTRAP: declare x86_fp80 @erfcl(x86_fp80 noundef) [[NOT_READNONE]]
267 exp(f
); expf(f
); expl(f
);
269 // NO__ERRNO: declare double @llvm.exp.f64(double) [[READNONE_INTRINSIC]]
270 // NO__ERRNO: declare float @llvm.exp.f32(float) [[READNONE_INTRINSIC]]
271 // NO__ERRNO: declare x86_fp80 @llvm.exp.f80(x86_fp80) [[READNONE_INTRINSIC]]
272 // HAS_ERRNO: declare double @exp(double noundef) [[NOT_READNONE]]
273 // HAS_ERRNO: declare float @expf(float noundef) [[NOT_READNONE]]
274 // HAS_ERRNO: declare x86_fp80 @expl(x86_fp80 noundef) [[NOT_READNONE]]
275 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.exp.f64(
276 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.exp.f32(
277 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.exp.f80(
279 exp2(f
); exp2f(f
); exp2l(f
);
281 // NO__ERRNO: declare double @llvm.exp2.f64(double) [[READNONE_INTRINSIC]]
282 // NO__ERRNO: declare float @llvm.exp2.f32(float) [[READNONE_INTRINSIC]]
283 // NO__ERRNO: declare x86_fp80 @llvm.exp2.f80(x86_fp80) [[READNONE_INTRINSIC]]
284 // HAS_ERRNO: declare double @exp2(double noundef) [[NOT_READNONE]]
285 // HAS_ERRNO: declare float @exp2f(float noundef) [[NOT_READNONE]]
286 // HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80 noundef) [[NOT_READNONE]]
287 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.exp2.f64(
288 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.exp2.f32(
289 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.exp2.f80(
291 expm1(f
); expm1f(f
); expm1l(f
);
293 // NO__ERRNO: declare double @expm1(double noundef) [[READNONE]]
294 // NO__ERRNO: declare float @expm1f(float noundef) [[READNONE]]
295 // NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80 noundef) [[READNONE]]
296 // HAS_ERRNO: declare double @expm1(double noundef) [[NOT_READNONE]]
297 // HAS_ERRNO: declare float @expm1f(float noundef) [[NOT_READNONE]]
298 // HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80 noundef) [[NOT_READNONE]]
299 // HAS_MAYTRAP: declare double @expm1(double noundef) [[NOT_READNONE]]
300 // HAS_MAYTRAP: declare float @expm1f(float noundef) [[NOT_READNONE]]
301 // HAS_MAYTRAP: declare x86_fp80 @expm1l(x86_fp80 noundef) [[NOT_READNONE]]
303 fdim(f
,f
); fdimf(f
,f
); fdiml(f
,f
);
305 // NO__ERRNO: declare double @fdim(double noundef, double noundef) [[READNONE]]
306 // NO__ERRNO: declare float @fdimf(float noundef, float noundef) [[READNONE]]
307 // NO__ERRNO: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
308 // HAS_ERRNO: declare double @fdim(double noundef, double noundef) [[NOT_READNONE]]
309 // HAS_ERRNO: declare float @fdimf(float noundef, float noundef) [[NOT_READNONE]]
310 // HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
311 // HAS_MAYTRAP: declare double @fdim(double noundef, double noundef) [[NOT_READNONE]]
312 // HAS_MAYTRAP: declare float @fdimf(float noundef, float noundef) [[NOT_READNONE]]
313 // HAS_MAYTRAP: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
315 floor(f
); floorf(f
); floorl(f
);
317 // NO__ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
318 // NO__ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
319 // NO__ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
320 // HAS_ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
321 // HAS_ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
322 // HAS_ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
323 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.floor.f64
324 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.floor.f32(
325 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.floor.f80(
327 fma(f
,f
,f
); fmaf(f
,f
,f
); fmal(f
,f
,f
);
329 // NO__ERRNO: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC]]
330 // NO__ERRNO: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
331 // NO__ERRNO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
332 // HAS_ERRNO: declare double @fma(double noundef, double noundef, double noundef) [[NOT_READNONE]]
333 // HAS_ERRNO: declare float @fmaf(float noundef, float noundef, float noundef) [[NOT_READNONE]]
334 // HAS_ERRNO: declare x86_fp80 @fmal(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
336 // On GNU or Win, fma never sets errno, so we can convert to the intrinsic.
338 // HAS_ERRNO_GNU: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC:#[0-9]+]]
339 // HAS_ERRNO_GNU: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
340 // HAS_ERRNO_GNU: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
342 // HAS_ERRNO_WIN: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC:#[0-9]+]]
343 // HAS_ERRNO_WIN: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
344 // Long double is just double on win, so no f80 use/declaration.
345 // HAS_ERRNO_WIN-NOT: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80)
347 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.fma.f64(
348 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.fma.f32(
349 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.fma.f80(
351 fmax(f
,f
); fmaxf(f
,f
); fmaxl(f
,f
);
353 // NO__ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
354 // NO__ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
355 // NO__ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
356 // HAS_ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
357 // HAS_ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
358 // HAS_ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
359 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.maxnum.f64(
360 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.maxnum.f32(
361 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.maxnum.f80(
363 fmin(f
,f
); fminf(f
,f
); fminl(f
,f
);
365 // NO__ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
366 // NO__ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
367 // NO__ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
368 // HAS_ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
369 // HAS_ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
370 // HAS_ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
371 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.minnum.f64(
372 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.minnum.f32(
373 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.minnum.f80(
375 fmaximum_num(*d
,*d
); fmaximum_numf(f
,f
); fmaximum_numl(*l
,*l
);
377 // COMMON: declare double @llvm.maximumnum.f64(double, double) [[READNONE_INTRINSIC]]
378 // COMMON: declare float @llvm.maximumnum.f32(float, float) [[READNONE_INTRINSIC]]
379 // COMMON: declare x86_fp80 @llvm.maximumnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
381 fminimum_num(*d
,*d
); fminimum_numf(f
,f
); fminimum_numl(*l
,*l
);
383 // COMMON: declare double @llvm.minimumnum.f64(double, double) [[READNONE_INTRINSIC]]
384 // COMMON: declare float @llvm.minimumnum.f32(float, float) [[READNONE_INTRINSIC]]
385 // COMMON: declare x86_fp80 @llvm.minimumnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
387 hypot(f
,f
); hypotf(f
,f
); hypotl(f
,f
);
389 // NO__ERRNO: declare double @hypot(double noundef, double noundef) [[READNONE]]
390 // NO__ERRNO: declare float @hypotf(float noundef, float noundef) [[READNONE]]
391 // NO__ERRNO: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
392 // HAS_ERRNO: declare double @hypot(double noundef, double noundef) [[NOT_READNONE]]
393 // HAS_ERRNO: declare float @hypotf(float noundef, float noundef) [[NOT_READNONE]]
394 // HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
395 // HAS_MAYTRAP: declare double @hypot(double noundef, double noundef) [[NOT_READNONE]]
396 // HAS_MAYTRAP: declare float @hypotf(float noundef, float noundef) [[NOT_READNONE]]
397 // HAS_MAYTRAP: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
399 ilogb(f
); ilogbf(f
); ilogbl(f
);
401 // NO__ERRNO: declare i32 @ilogb(double noundef) [[READNONE]]
402 // NO__ERRNO: declare i32 @ilogbf(float noundef) [[READNONE]]
403 // NO__ERRNO: declare i32 @ilogbl(x86_fp80 noundef) [[READNONE]]
404 // HAS_ERRNO: declare i32 @ilogb(double noundef) [[NOT_READNONE]]
405 // HAS_ERRNO: declare i32 @ilogbf(float noundef) [[NOT_READNONE]]
406 // HAS_ERRNO: declare i32 @ilogbl(x86_fp80 noundef) [[NOT_READNONE]]
407 // HAS_MAYTRAP: declare i32 @ilogb(double noundef) [[NOT_READNONE]]
408 // HAS_MAYTRAP: declare i32 @ilogbf(float noundef) [[NOT_READNONE]]
409 // HAS_MAYTRAP: declare i32 @ilogbl(x86_fp80 noundef) [[NOT_READNONE]]
411 lgamma(f
); lgammaf(f
); lgammal(f
);
413 // NO__ERRNO: declare double @lgamma(double noundef) [[NOT_READNONE]]
414 // NO__ERRNO: declare float @lgammaf(float noundef) [[NOT_READNONE]]
415 // NO__ERRNO: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NOT_READNONE]]
416 // HAS_ERRNO: declare double @lgamma(double noundef) [[NOT_READNONE]]
417 // HAS_ERRNO: declare float @lgammaf(float noundef) [[NOT_READNONE]]
418 // HAS_ERRNO: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NOT_READNONE]]
419 // HAS_MAYTRAP: declare double @lgamma(double noundef) [[NOT_READNONE]]
420 // HAS_MAYTRAP: declare float @lgammaf(float noundef) [[NOT_READNONE]]
421 // HAS_MAYTRAP: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NOT_READNONE]]
423 llrint(f
); llrintf(f
); llrintl(f
);
425 // NO__ERRNO: declare i64 @llvm.llrint.i64.f64(double) [[READNONE_INTRINSIC]]
426 // NO__ERRNO: declare i64 @llvm.llrint.i64.f32(float) [[READNONE_INTRINSIC]]
427 // NO__ERRNO: declare i64 @llvm.llrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
428 // HAS_ERRNO: declare i64 @llrint(double noundef) [[NOT_READNONE]]
429 // HAS_ERRNO: declare i64 @llrintf(float noundef) [[NOT_READNONE]]
430 // HAS_ERRNO: declare i64 @llrintl(x86_fp80 noundef) [[NOT_READNONE]]
431 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f64(
432 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f32(
433 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f80(
435 llround(f
); llroundf(f
); llroundl(f
);
437 // NO__ERRNO: declare i64 @llvm.llround.i64.f64(double) [[READNONE_INTRINSIC]]
438 // NO__ERRNO: declare i64 @llvm.llround.i64.f32(float) [[READNONE_INTRINSIC]]
439 // NO__ERRNO: declare i64 @llvm.llround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
440 // HAS_ERRNO: declare i64 @llround(double noundef) [[NOT_READNONE]]
441 // HAS_ERRNO: declare i64 @llroundf(float noundef) [[NOT_READNONE]]
442 // HAS_ERRNO: declare i64 @llroundl(x86_fp80 noundef) [[NOT_READNONE]]
443 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f64(
444 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f32(
445 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f80(
447 log(f
); logf(f
); logl(f
);
449 // NO__ERRNO: declare double @llvm.log.f64(double) [[READNONE_INTRINSIC]]
450 // NO__ERRNO: declare float @llvm.log.f32(float) [[READNONE_INTRINSIC]]
451 // NO__ERRNO: declare x86_fp80 @llvm.log.f80(x86_fp80) [[READNONE_INTRINSIC]]
452 // HAS_ERRNO: declare double @log(double noundef) [[NOT_READNONE]]
453 // HAS_ERRNO: declare float @logf(float noundef) [[NOT_READNONE]]
454 // HAS_ERRNO: declare x86_fp80 @logl(x86_fp80 noundef) [[NOT_READNONE]]
455 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.log.f64(
456 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.log.f32(
457 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log.f80(
459 log10(f
); log10f(f
); log10l(f
);
461 // NO__ERRNO: declare double @llvm.log10.f64(double) [[READNONE_INTRINSIC]]
462 // NO__ERRNO: declare float @llvm.log10.f32(float) [[READNONE_INTRINSIC]]
463 // NO__ERRNO: declare x86_fp80 @llvm.log10.f80(x86_fp80) [[READNONE_INTRINSIC]]
464 // HAS_ERRNO: declare double @log10(double noundef) [[NOT_READNONE]]
465 // HAS_ERRNO: declare float @log10f(float noundef) [[NOT_READNONE]]
466 // HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80 noundef) [[NOT_READNONE]]
467 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.log10.f64(
468 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.log10.f32(
469 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log10.f80(
471 log1p(f
); log1pf(f
); log1pl(f
);
473 // NO__ERRNO: declare double @log1p(double noundef) [[READNONE]]
474 // NO__ERRNO: declare float @log1pf(float noundef) [[READNONE]]
475 // NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80 noundef) [[READNONE]]
476 // HAS_ERRNO: declare double @log1p(double noundef) [[NOT_READNONE]]
477 // HAS_ERRNO: declare float @log1pf(float noundef) [[NOT_READNONE]]
478 // HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80 noundef) [[NOT_READNONE]]
479 // HAS_MAYTRAP: declare double @log1p(double noundef) [[NOT_READNONE]]
480 // HAS_MAYTRAP: declare float @log1pf(float noundef) [[NOT_READNONE]]
481 // HAS_MAYTRAP: declare x86_fp80 @log1pl(x86_fp80 noundef) [[NOT_READNONE]]
483 log2(f
); log2f(f
); log2l(f
);
485 // NO__ERRNO: declare double @llvm.log2.f64(double) [[READNONE_INTRINSIC]]
486 // NO__ERRNO: declare float @llvm.log2.f32(float) [[READNONE_INTRINSIC]]
487 // NO__ERRNO: declare x86_fp80 @llvm.log2.f80(x86_fp80) [[READNONE_INTRINSIC]]
488 // HAS_ERRNO: declare double @log2(double noundef) [[NOT_READNONE]]
489 // HAS_ERRNO: declare float @log2f(float noundef) [[NOT_READNONE]]
490 // HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80 noundef) [[NOT_READNONE]]
491 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.log2.f64(
492 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.log2.f32(
493 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log2.f80(
495 logb(f
); logbf(f
); logbl(f
);
497 // NO__ERRNO: declare double @logb(double noundef) [[READNONE]]
498 // NO__ERRNO: declare float @logbf(float noundef) [[READNONE]]
499 // NO__ERRNO: declare x86_fp80 @logbl(x86_fp80 noundef) [[READNONE]]
500 // HAS_ERRNO: declare double @logb(double noundef) [[NOT_READNONE]]
501 // HAS_ERRNO: declare float @logbf(float noundef) [[NOT_READNONE]]
502 // HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80 noundef) [[NOT_READNONE]]
503 // HAS_MAYTRAP: declare double @logb(double noundef) [[NOT_READNONE]]
504 // HAS_MAYTRAP: declare float @logbf(float noundef) [[NOT_READNONE]]
505 // HAS_MAYTRAP: declare x86_fp80 @logbl(x86_fp80 noundef) [[NOT_READNONE]]
507 lrint(f
); lrintf(f
); lrintl(f
);
509 // NO__ERRNO: declare i64 @llvm.lrint.i64.f64(double) [[READNONE_INTRINSIC]]
510 // NO__ERRNO: declare i64 @llvm.lrint.i64.f32(float) [[READNONE_INTRINSIC]]
511 // NO__ERRNO: declare i64 @llvm.lrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
512 // HAS_ERRNO: declare i64 @lrint(double noundef) [[NOT_READNONE]]
513 // HAS_ERRNO: declare i64 @lrintf(float noundef) [[NOT_READNONE]]
514 // HAS_ERRNO: declare i64 @lrintl(x86_fp80 noundef) [[NOT_READNONE]]
515 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f64(
516 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f32(
517 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f80(
519 lround(f
); lroundf(f
); lroundl(f
);
521 // NO__ERRNO: declare i64 @llvm.lround.i64.f64(double) [[READNONE_INTRINSIC]]
522 // NO__ERRNO: declare i64 @llvm.lround.i64.f32(float) [[READNONE_INTRINSIC]]
523 // NO__ERRNO: declare i64 @llvm.lround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
524 // HAS_ERRNO: declare i64 @lround(double noundef) [[NOT_READNONE]]
525 // HAS_ERRNO: declare i64 @lroundf(float noundef) [[NOT_READNONE]]
526 // HAS_ERRNO: declare i64 @lroundl(x86_fp80 noundef) [[NOT_READNONE]]
527 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f64(
528 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f32(
529 // HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f80(
531 nearbyint(f
); nearbyintf(f
); nearbyintl(f
);
533 // NO__ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
534 // NO__ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
535 // NO__ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
536 // HAS_ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
537 // HAS_ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
538 // HAS_ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
539 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.nearbyint.f64(
540 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.nearbyint.f32(
541 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.nearbyint.f80(
543 nextafter(f
,f
); nextafterf(f
,f
); nextafterl(f
,f
);
545 // NO__ERRNO: declare double @nextafter(double noundef, double noundef) [[READNONE]]
546 // NO__ERRNO: declare float @nextafterf(float noundef, float noundef) [[READNONE]]
547 // NO__ERRNO: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
548 // HAS_ERRNO: declare double @nextafter(double noundef, double noundef) [[NOT_READNONE]]
549 // HAS_ERRNO: declare float @nextafterf(float noundef, float noundef) [[NOT_READNONE]]
550 // HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
551 // HAS_MAYTRAP: declare double @nextafter(double noundef, double noundef) [[NOT_READNONE]]
552 // HAS_MAYTRAP: declare float @nextafterf(float noundef, float noundef) [[NOT_READNONE]]
553 // HAS_MAYTRAP: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
555 nexttoward(f
,f
); nexttowardf(f
,f
);nexttowardl(f
,f
);
557 // NO__ERRNO: declare double @nexttoward(double noundef, x86_fp80 noundef) [[READNONE]]
558 // NO__ERRNO: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[READNONE]]
559 // NO__ERRNO: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
560 // HAS_ERRNO: declare double @nexttoward(double noundef, x86_fp80 noundef) [[NOT_READNONE]]
561 // HAS_ERRNO: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[NOT_READNONE]]
562 // HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
563 // HAS_MAYTRAP: declare double @nexttoward(double noundef, x86_fp80 noundef) [[NOT_READNONE]]
564 // HAS_MAYTRAP: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[NOT_READNONE]]
565 // HAS_MAYTRAP: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
567 remainder(f
,f
); remainderf(f
,f
); remainderl(f
,f
);
569 // NO__ERRNO: declare double @remainder(double noundef, double noundef) [[READNONE]]
570 // NO__ERRNO: declare float @remainderf(float noundef, float noundef) [[READNONE]]
571 // NO__ERRNO: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
572 // HAS_ERRNO: declare double @remainder(double noundef, double noundef) [[NOT_READNONE]]
573 // HAS_ERRNO: declare float @remainderf(float noundef, float noundef) [[NOT_READNONE]]
574 // HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
575 // HAS_MAYTRAP: declare double @remainder(double noundef, double noundef) [[NOT_READNONE]]
576 // HAS_MAYTRAP: declare float @remainderf(float noundef, float noundef) [[NOT_READNONE]]
577 // HAS_MAYTRAP: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
579 remquo(f
,f
,i
); remquof(f
,f
,i
); remquol(f
,f
,i
);
581 // NO__ERRNO: declare double @remquo(double noundef, double noundef, ptr noundef) [[NOT_READNONE]]
582 // NO__ERRNO: declare float @remquof(float noundef, float noundef, ptr noundef) [[NOT_READNONE]]
583 // NO__ERRNO: declare x86_fp80 @remquol(x86_fp80 noundef, x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
584 // HAS_ERRNO: declare double @remquo(double noundef, double noundef, ptr noundef) [[NOT_READNONE]]
585 // HAS_ERRNO: declare float @remquof(float noundef, float noundef, ptr noundef) [[NOT_READNONE]]
586 // HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80 noundef, x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
587 // HAS_MAYTRAP: declare double @remquo(double noundef, double noundef, ptr noundef) [[NOT_READNONE]]
588 // HAS_MAYTRAP: declare float @remquof(float noundef, float noundef, ptr noundef) [[NOT_READNONE]]
589 // HAS_MAYTRAP: declare x86_fp80 @remquol(x86_fp80 noundef, x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
591 rint(f
); rintf(f
); rintl(f
);
593 // NO__ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
594 // NO__ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
595 // NO__ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
596 // HAS_ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
597 // HAS_ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
598 // HAS_ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
599 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.rint.f64(
600 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.rint.f32(
601 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.rint.f80(
603 round(f
); roundf(f
); roundl(f
);
605 // NO__ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
606 // NO__ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
607 // NO__ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
608 // HAS_ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
609 // HAS_ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
610 // HAS_ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
611 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.round.f64(
612 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.round.f32(
613 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.round.f80(
615 scalbln(f
,f
); scalblnf(f
,f
); scalblnl(f
,f
);
617 // NO__ERRNO: declare double @scalbln(double noundef, i64 noundef) [[READNONE]]
618 // NO__ERRNO: declare float @scalblnf(float noundef, i64 noundef) [[READNONE]]
619 // NO__ERRNO: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[READNONE]]
620 // HAS_ERRNO: declare double @scalbln(double noundef, i64 noundef) [[NOT_READNONE]]
621 // HAS_ERRNO: declare float @scalblnf(float noundef, i64 noundef) [[NOT_READNONE]]
622 // HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[NOT_READNONE]]
623 // HAS_MAYTRAP: declare double @scalbln(double noundef, i64 noundef) [[NOT_READNONE]]
624 // HAS_MAYTRAP: declare float @scalblnf(float noundef, i64 noundef) [[NOT_READNONE]]
625 // HAS_MAYTRAP: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[NOT_READNONE]]
627 scalbn(f
,f
); scalbnf(f
,f
); scalbnl(f
,f
);
629 // NO__ERRNO: declare double @scalbn(double noundef, i32 noundef) [[READNONE]]
630 // NO__ERRNO: declare float @scalbnf(float noundef, i32 noundef) [[READNONE]]
631 // NO__ERRNO: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[READNONE]]
632 // HAS_ERRNO: declare double @scalbn(double noundef, i32 noundef) [[NOT_READNONE]]
633 // HAS_ERRNO: declare float @scalbnf(float noundef, i32 noundef) [[NOT_READNONE]]
634 // HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]]
635 // HAS_MAYTRAP: declare double @scalbn(double noundef, i32 noundef) [[NOT_READNONE]]
636 // HAS_MAYTRAP: declare float @scalbnf(float noundef, i32 noundef) [[NOT_READNONE]]
637 // HAS_MAYTRAP: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]]
639 sin(f
); sinf(f
); sinl(f
);
641 // NO__ERRNO: declare double @llvm.sin.f64(double) [[READNONE_INTRINSIC]]
642 // NO__ERRNO: declare float @llvm.sin.f32(float) [[READNONE_INTRINSIC]]
643 // NO__ERRNO: declare x86_fp80 @llvm.sin.f80(x86_fp80) [[READNONE_INTRINSIC]]
644 // HAS_ERRNO: declare double @sin(double noundef) [[NOT_READNONE]]
645 // HAS_ERRNO: declare float @sinf(float noundef) [[NOT_READNONE]]
646 // HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80 noundef) [[NOT_READNONE]]
647 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.sin.f64(
648 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.sin.f32(
649 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.sin.f80(
651 sinh(f
); sinhf(f
); sinhl(f
);
653 // NO__ERRNO: declare double @llvm.sinh.f64(double) [[READNONE_INTRINSIC]]
654 // NO__ERRNO: declare float @llvm.sinh.f32(float) [[READNONE_INTRINSIC]]
655 // NO__ERRNO: declare x86_fp80 @llvm.sinh.f80(x86_fp80) [[READNONE_INTRINSIC]]
656 // HAS_ERRNO: declare double @sinh(double noundef) [[NOT_READNONE]]
657 // HAS_ERRNO: declare float @sinhf(float noundef) [[NOT_READNONE]]
658 // HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80 noundef) [[NOT_READNONE]]
659 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.sinh.f64(
660 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.sinh.f32(
661 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.sinh.f80(
664 sqrt(f
); sqrtf(f
); sqrtl(f
);
666 // NO__ERRNO: declare double @llvm.sqrt.f64(double) [[READNONE_INTRINSIC]]
667 // NO__ERRNO: declare float @llvm.sqrt.f32(float) [[READNONE_INTRINSIC]]
668 // NO__ERRNO: declare x86_fp80 @llvm.sqrt.f80(x86_fp80) [[READNONE_INTRINSIC]]
669 // HAS_ERRNO: declare double @sqrt(double noundef) [[NOT_READNONE]]
670 // HAS_ERRNO: declare float @sqrtf(float noundef) [[NOT_READNONE]]
671 // HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80 noundef) [[NOT_READNONE]]
672 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.sqrt.f64(
673 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.sqrt.f32(
674 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.sqrt.f80(
676 tan(f
); tanf(f
); tanl(f
);
678 // NO__ERRNO: declare double @llvm.tan.f64(double) [[READNONE_INTRINSIC]]
679 // NO__ERRNO: declare float @llvm.tan.f32(float) [[READNONE_INTRINSIC]]
680 // NO__ERRNO: declare x86_fp80 @llvm.tan.f80(x86_fp80) [[READNONE_INTRINSIC]]
681 // HAS_ERRNO: declare double @tan(double noundef) [[NOT_READNONE]]
682 // HAS_ERRNO: declare float @tanf(float noundef) [[NOT_READNONE]]
683 // HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80 noundef) [[NOT_READNONE]]
684 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.tan.f64(
685 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.tan.f32(
686 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.tan.f80(
688 tanh(f
); tanhf(f
); tanhl(f
);
690 // NO__ERRNO: declare double @llvm.tanh.f64(double) [[READNONE_INTRINSIC]]
691 // NO__ERRNO: declare float @llvm.tanh.f32(float) [[READNONE_INTRINSIC]]
692 // NO__ERRNO: declare x86_fp80 @llvm.tanh.f80(x86_fp80) [[READNONE_INTRINSIC]]
693 // HAS_ERRNO: declare double @tanh(double noundef) [[NOT_READNONE]]
694 // HAS_ERRNO: declare float @tanhf(float noundef) [[NOT_READNONE]]
695 // HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80 noundef) [[NOT_READNONE]]
696 // HAS_MAYTRAP: declare double @llvm.experimental.constrained.tanh.f64(
697 // HAS_MAYTRAP: declare float @llvm.experimental.constrained.tanh.f32(
698 // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.tanh.f80(
700 tgamma(f
); tgammaf(f
); tgammal(f
);
702 // NO__ERRNO: declare double @tgamma(double noundef) [[READNONE]]
703 // NO__ERRNO: declare float @tgammaf(float noundef) [[READNONE]]
704 // NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80 noundef) [[READNONE]]
705 // HAS_ERRNO: declare double @tgamma(double noundef) [[NOT_READNONE]]
706 // HAS_ERRNO: declare float @tgammaf(float noundef) [[NOT_READNONE]]
707 // HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80 noundef) [[NOT_READNONE]]
708 // HAS_MAYTRAP: declare double @tgamma(double noundef) [[NOT_READNONE]]
709 // HAS_MAYTRAP: declare float @tgammaf(float noundef) [[NOT_READNONE]]
710 // HAS_MAYTRAP: declare x86_fp80 @tgammal(x86_fp80 noundef) [[NOT_READNONE]]
712 trunc(f
); truncf(f
); truncl(f
);
714 // NO__ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
715 // NO__ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
716 // NO__ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
717 // HAS_ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
718 // HAS_ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
719 // HAS_ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
722 // NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }
723 // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
724 // NO__ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
725 // NO__ERRNO: attributes [[READONLY]] = { {{.*}}memory(read){{.*}} }
727 // HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
728 // HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }
729 // HAS_ERRNO: attributes [[READONLY]] = { {{.*}}memory(read){{.*}} }
730 // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
732 // HAS_MAYTRAP: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
733 // HAS_MAYTRAP: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
735 // HAS_ERRNO_GNU: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }
736 // HAS_ERRNO_WIN: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }