diff options
author | Tue Ly <lntue@google.com> | 2022-07-27 12:22:27 -0400 |
---|---|---|
committer | Tue Ly <lntue@google.com> | 2022-07-29 21:08:31 -0400 |
commit | 2ff187fbc9f234303fa8905d74faef24643411e0 (patch) | |
tree | 5bf3303fc338e13e9b655cb05a319bd477054c8b /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 6ee9e25fd95939061a94e6feb8635521993fac48 (diff) | |
download | llvm-2ff187fbc9f234303fa8905d74faef24643411e0.zip llvm-2ff187fbc9f234303fa8905d74faef24643411e0.tar.gz llvm-2ff187fbc9f234303fa8905d74faef24643411e0.tar.bz2 |
[libc] Implement cosf function that is correctly rounded to all rounding modes.
Implement cosf function that is correctly rounded to all rounding
modes.
Performance benchmark using perf tool from CORE-MATH project
(https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700:
Before this patch (not correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
CORE-MATH reciprocal throughput : 19.043
System LIBC reciprocal throughput : 26.328
LIBC reciprocal throughput : 30.955
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 49.995
System LIBC latency : 59.286
LIBC latency : 60.174
```
After this patch (correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 19.072
System LIBC reciprocal throughput : 26.286
LIBC reciprocal throughput : 13.631
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 49.872
System LIBC latency : 59.468
LIBC latency : 56.119
```
Reviewed By: orex, zimmermann6
Differential Revision: https://reviews.llvm.org/D130644
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions