[compiler-rt] [compiler-rt][ARM] Optimized f32 add/subtract for Armv6-M. (PR #154093)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 07:11:38 PDT 2025


smithp35 wrote:

> > Do you happen to have a figure for code-size? One possible objection is someone preferring a smallest possible implementation for M0 at the expense of performance.
> 
> You're right, the code size is bigger in this implementation. The new `addsf3.S` assembles to 648 bytes of code, and (at `-Os`) another 68 bytes for the helper `fnan2.c`. The old version was 312 bytes for `addsf3.S` and 22 bytes for the `subsf3.c` wrapper.

Looking at the size of the v6-m libgcc implementation, which has a symbol size of 0x41c bytes (1052) then while this implementation is larger than previous compiler-rt it is not as large as the most commonly used open-source implementation.

Personally I'm comfortable that the size isn't prohibitively large.


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


More information about the llvm-commits mailing list