Commit 5c3b36b
committed
Clang: Add minnum/maxnum builtin functions support
With #112852, we claimed
that llvm.minnum and llvm.maxnum should treat +0.0>-0.0,
while libc doesn't require fmin(3)/fmax(3) for it.
To make llvm.minnum/llvm.maxnum easy to use, we define the builtin
functions for them, include
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum
All of them support _Float16, float, double, long double.1 parent 2e39533 commit 5c3b36b
File tree
5 files changed
+365
-0
lines changed- clang
- include/clang
- Basic
- Sema
- lib
- CodeGen
- Sema
- test/CodeGen
5 files changed
+365
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
212 | 224 | | |
213 | 225 | | |
214 | 226 | | |
| |||
1304 | 1316 | | |
1305 | 1317 | | |
1306 | 1318 | | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
1307 | 1331 | | |
1308 | 1332 | | |
1309 | 1333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2582 | 2582 | | |
2583 | 2583 | | |
2584 | 2584 | | |
| 2585 | + | |
2585 | 2586 | | |
2586 | 2587 | | |
2587 | 2588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3238 | 3238 | | |
3239 | 3239 | | |
3240 | 3240 | | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
3241 | 3251 | | |
3242 | 3252 | | |
3243 | 3253 | | |
| |||
4429 | 4439 | | |
4430 | 4440 | | |
4431 | 4441 | | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
4432 | 4458 | | |
4433 | 4459 | | |
4434 | 4460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2757 | 2757 | | |
2758 | 2758 | | |
2759 | 2759 | | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
2760 | 2767 | | |
2761 | 2768 | | |
| 2769 | + | |
| 2770 | + | |
2762 | 2771 | | |
2763 | 2772 | | |
2764 | 2773 | | |
| |||
15276 | 15285 | | |
15277 | 15286 | | |
15278 | 15287 | | |
| 15288 | + | |
| 15289 | + | |
| 15290 | + | |
| 15291 | + | |
| 15292 | + | |
| 15293 | + | |
| 15294 | + | |
| 15295 | + | |
| 15296 | + | |
| 15297 | + | |
| 15298 | + | |
| 15299 | + | |
| 15300 | + | |
| 15301 | + | |
| 15302 | + | |
| 15303 | + | |
| 15304 | + | |
| 15305 | + | |
| 15306 | + | |
| 15307 | + | |
| 15308 | + | |
| 15309 | + | |
| 15310 | + | |
| 15311 | + | |
| 15312 | + | |
| 15313 | + | |
| 15314 | + | |
| 15315 | + | |
| 15316 | + | |
| 15317 | + | |
| 15318 | + | |
| 15319 | + | |
| 15320 | + | |
| 15321 | + | |
| 15322 | + | |
| 15323 | + | |
15279 | 15324 | | |
15280 | 15325 | | |
15281 | 15326 | | |
| |||
0 commit comments