Commit 1f9953c
authored
[clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno (llvm#112580)
These two veclibs are only available for AArch64 targets, and as
mentioned in https://discourse.llvm.org/t/rfc-should-fveclib-imply-fno-math-errno-for-all-targets/81384,
we (Arm) think that `-fveclib` should imply `-fno-math-errno`. By
setting `-fveclib` the user shows they intend to use the vector math
functions, which implies they don't care about errno. However,
currently, the vector mappings won't be used in many cases without
setting `-fno-math-errno` separately.
Making this change would also help resolve some inconsistencies in how
vector mappings are applied (see llvm#108980 (comment)).
Note: Both SLEEF and ArmPL state that they do not set `errno`:
- https://developer.arm.com/documentation/101004/2410/General-information/Arm-Performance-Libraries-math-functions
* "The vector functions in libamath which are available on Linux may not set errno nor raise exceptions"
- https://sleef.org/2-references/libm/
* "These functions do not set errno nor raise an exception."1 parent eb9af19 commit 1f9953c
File tree
6 files changed
+90
-1
lines changed- clang
- include/clang
- Basic
- Driver
- lib/Driver/ToolChains
- test/Driver
6 files changed
+90
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3411 | 3411 | | |
3412 | 3412 | | |
3413 | 3413 | | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
3414 | 3417 | | |
3415 | 3418 | | |
3416 | 3419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
2854 | 2855 | | |
2855 | 2856 | | |
2856 | 2857 | | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
2857 | 2866 | | |
2858 | 2867 | | |
2859 | 2868 | | |
| |||
2960 | 2969 | | |
2961 | 2970 | | |
2962 | 2971 | | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
2963 | 2978 | | |
2964 | 2979 | | |
2965 | 2980 | | |
| |||
3125 | 3140 | | |
3126 | 3141 | | |
3127 | 3142 | | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
3128 | 3150 | | |
3129 | 3151 | | |
3130 | 3152 | | |
| |||
3338 | 3360 | | |
3339 | 3361 | | |
3340 | 3362 | | |
3341 | | - | |
| 3363 | + | |
3342 | 3364 | | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
3343 | 3370 | | |
3344 | 3371 | | |
3345 | 3372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
0 commit comments