[PATCH] D134369: [Clang] Support constexpr builtin fmax

Evgeny Shulgin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 09:02:14 PDT 2022


Izaron added a comment.

This patch is derived from https://reviews.llvm.org/D134136 (which was abandoned due to poor tests and overcomplication)

The constexpr version of `fmax` matches the libc realization: the libc realization is here <https://github.com/llvm/llvm-project/blob/74f0e64bb94aba8264c8c7d45a930a894893eaa2/libc/src/__support/FPUtil/BasicOperations.h#L44-L60>.

It is verified with test that matches libc test: the libc test is here <https://github.com/llvm/llvm-project/blob/main/libc/test/src/math/FMaxTest.h>.

If this patch is approved, I promise to do a similar patch for the `fmin` function 😀


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134369/new/

https://reviews.llvm.org/D134369



More information about the cfe-commits mailing list