Commit 679f925
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 1f195af commit 679f925
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 | |
|---|---|---|---|
| |||
2597 | 2597 | | |
2598 | 2598 | | |
2599 | 2599 | | |
| 2600 | + | |
2600 | 2601 | | |
2601 | 2602 | | |
2602 | 2603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2629 | 2629 | | |
2630 | 2630 | | |
2631 | 2631 | | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
2632 | 2642 | | |
2633 | 2643 | | |
2634 | 2644 | | |
| |||
3818 | 3828 | | |
3819 | 3829 | | |
3820 | 3830 | | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
3821 | 3847 | | |
3822 | 3848 | | |
3823 | 3849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2760 | 2760 | | |
2761 | 2761 | | |
2762 | 2762 | | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
2763 | 2770 | | |
2764 | 2771 | | |
| 2772 | + | |
| 2773 | + | |
2765 | 2774 | | |
2766 | 2775 | | |
2767 | 2776 | | |
| |||
15278 | 15287 | | |
15279 | 15288 | | |
15280 | 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 | + | |
| 15324 | + | |
| 15325 | + | |
15281 | 15326 | | |
15282 | 15327 | | |
15283 | 15328 | | |
| |||
0 commit comments