[all-commits] [llvm/llvm-project] 484319: [libc] Make expm1f correctly rounded when the targ...
lntue via All-commits
all-commits at lists.llvm.org
Fri Jun 3 12:58:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 484319f4972850d6e9bb3d433042cb56806ba183
https://github.com/llvm/llvm-project/commit/484319f4972850d6e9bb3d433042cb56806ba183
Author: Tue Ly <lntue.h at gmail.com>
Date: 2022-06-03 (Fri, 03 Jun 2022)
Changed paths:
M libc/src/math/generic/expm1f.cpp
M libc/test/src/math/CMakeLists.txt
M libc/test/src/math/exhaustive/CMakeLists.txt
M libc/test/src/math/exhaustive/expm1f_test.cpp
M libc/test/src/math/expm1f_test.cpp
Log Message:
-----------
[libc] Make expm1f correctly rounded when the targets have no FMA instructions.
Add another exceptional value and fix the case when |x| is small.
Performance tests with CORE-MATH project scripts:
With FMA instructions on Ryzen 1700:
```
$ ./perf.sh expm1f
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
CORE-MATH reciprocal throughput : 15.362
System LIBC reciprocal throughput : 53.194
LIBC reciprocal throughput : 14.595
$ ./perf.sh expm1f --latency
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
CORE-MATH latency : 57.755
System LIBC latency : 147.020
LIBC latency : 60.269
```
Without FMA instructions:
```
$ ./perf.sh expm1f
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
CORE-MATH reciprocal throughput : 15.362
System LIBC reciprocal throughput : 53.300
LIBC reciprocal throughput : 18.020
$ ./perf.sh expm1f --latency
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
CORE-MATH latency : 57.758
System LIBC latency : 147.025
LIBC latency : 70.304
```
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D123440
More information about the All-commits
mailing list