Debian Codegraph @

clang/test/CodeGen/X86/math-builtins.c

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