diff options
author | Hendrik Hübner <117831077+HendrikHuebner@users.noreply.github.com> | 2024-06-06 04:44:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 22:44:44 -0400 |
commit | 8e674953264e1545397d9a19a2661e157e8d6525 (patch) | |
tree | 7d19a5d6fe76e1c68195307f5266c39cfe77e256 /libc/test | |
parent | d5ab38f69c1a5c1456bc1a8cc936489d31599f33 (diff) | |
download | llvm-8e674953264e1545397d9a19a2661e157e8d6525.zip llvm-8e674953264e1545397d9a19a2661e157e8d6525.tar.gz llvm-8e674953264e1545397d9a19a2661e157e8d6525.tar.bz2 |
[libc][math][c23] Implement fmaxf16 and fminf16 function (#94131)
Implements fmaxf16 and fminf16, which are two missing functions listed
here: #93566
Diffstat (limited to 'libc/test')
-rw-r--r-- | libc/test/src/math/smoke/CMakeLists.txt | 26 | ||||
-rw-r--r-- | libc/test/src/math/smoke/fmaxf16_test.cpp | 13 | ||||
-rw-r--r-- | libc/test/src/math/smoke/fminf16_test.cpp | 13 |
3 files changed, 52 insertions, 0 deletions
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt index 09e54349..a331c02 100644 --- a/libc/test/src/math/smoke/CMakeLists.txt +++ b/libc/test/src/math/smoke/CMakeLists.txt @@ -1748,6 +1748,19 @@ add_fp_unittest( ) add_fp_unittest( + fminf16_test + SUITE + libc-math-smoke-tests + SRCS + fminf16_test.cpp + HDRS + FMinTest.h + DEPENDS + libc.src.math.fminf16 + libc.src.__support.FPUtil.fp_bits +) + +add_fp_unittest( fmaxf_test SUITE libc-math-smoke-tests @@ -1800,6 +1813,19 @@ add_fp_unittest( ) add_fp_unittest( + fmaxf16_test + SUITE + libc-math-smoke-tests + SRCS + fmaxf16_test.cpp + HDRS + FMaxTest.h + DEPENDS + libc.src.math.fmaxf16 + libc.src.__support.FPUtil.fp_bits +) + +add_fp_unittest( fmaximuml_test SUITE libc-math-smoke-tests diff --git a/libc/test/src/math/smoke/fmaxf16_test.cpp b/libc/test/src/math/smoke/fmaxf16_test.cpp new file mode 100644 index 0000000..79c03b7 --- /dev/null +++ b/libc/test/src/math/smoke/fmaxf16_test.cpp @@ -0,0 +1,13 @@ +//===-- Unittests for fmaxf16 --------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "FMaxTest.h" + +#include "src/math/fmaxf16.h" + +LIST_FMAX_TESTS(float16, LIBC_NAMESPACE::fmaxf16) diff --git a/libc/test/src/math/smoke/fminf16_test.cpp b/libc/test/src/math/smoke/fminf16_test.cpp new file mode 100644 index 0000000..4379a6e --- /dev/null +++ b/libc/test/src/math/smoke/fminf16_test.cpp @@ -0,0 +1,13 @@ +//===-- Unittests for fminf16 ---------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "FMinTest.h" + +#include "src/math/fminf16.h" + +LIST_FMIN_TESTS(float16, LIBC_NAMESPACE::fminf16) |