[all-commits] [llvm/llvm-project] 131dda: [libc] Implement sincosf function correctly rounde...

lntue via All-commits all-commits at lists.llvm.org
Fri Aug 5 06:58:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 131dda9acc6978aba4740d75ca45f411fbabd726
      https://github.com/llvm/llvm-project/commit/131dda9acc6978aba4740d75ca45f411fbabd726
  Author: Tue Ly <lntue at google.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M libc/docs/math.rst
    M libc/src/math/generic/CMakeLists.txt
    M libc/src/math/generic/common_constants.cpp
    M libc/src/math/generic/common_constants.h
    M libc/src/math/generic/cosf.cpp
    M libc/src/math/generic/sincosf.cpp
    R libc/src/math/generic/sincosf_data.cpp
    M libc/src/math/generic/sincosf_utils.h
    M libc/src/math/generic/sinf.cpp
    M libc/test/src/math/exhaustive/CMakeLists.txt
    A libc/test/src/math/exhaustive/sincosf_test.cpp
    M libc/test/src/math/sincosf_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  [libc] Implement sincosf function correctly rounded to all rounding modes.

Refactor common range reductions and evaluations for sinf, cosf, and
sincosf.  Added exhaustive tests for sincosf.

Performance before the patch:
```
System LIBC reciprocal throughput : 30.205
LIBC reciprocal throughput        : 30.533

System LIBC latency : 67.961
LIBC latency        : 61.564
```
Performance after the patch:
```
System LIBC reciprocal throughput : 30.409
LIBC reciprocal throughput        : 20.273

System LIBC latency : 67.527
LIBC latency        : 61.959
```

Reviewed By: orex

Differential Revision: https://reviews.llvm.org/D130901




More information about the All-commits mailing list