[libc-commits] [libc] [llvm] [libc][math] Optimize integer-only expf and factor out shared utilities. (PR #233118)

via libc-commits libc-commits at lists.llvm.org
Sat Oct 17 10:39:46 PDT 2026


lntue wrote:

Code sizes including `EXP2F_COEFFS` (88 B):

| Target | Implementation | `-O2` | `-O3` | `-Os` | `-Oz` | Soft-FP Runtime |                                                  
| :--- | :--- | ---: | ---: | ---: | ---: | :--- |                                                                             
| `armv8m.main-none-eabi` | `integer_eval` (after) | 360 B | 360 B | 360 B | 356 B | 0 B |                                     
| | `integer_eval` (before) | 1,134 B | 1,198 B | 1,938 B | 1,188 B | 0 B (+84 B `-Oz`) |                       
| | `float_eval` | 432 B | 460 B | 420 B | 436 B | 0 B |                                                                       
| `armv7m-none-eabi` | `integer_eval` (after) | 364 B | 366 B | 364 B | 356 B | 0 B |                                          
| | `integer_eval` (before) | 1,096 B | 1,100 B | 1,908 B | 1,152 B | 0 B (+84 B `-Oz`) |               
| | `float_eval` | 550 B | 558 B | 532 B | 516 B | +1,116–1,668 B | 

https://github.com/llvm/llvm-project/pull/233118


More information about the libc-commits mailing list