[libc-commits] [libc] [libc][math][c23] add c23 floating point fmaximum and fminimum functions. (PR #86016)

via libc-commits libc-commits at lists.llvm.org
Sat Mar 23 20:52:52 PDT 2024


================
@@ -0,0 +1,21 @@
+//===-- Implementation of the fmaximum function for GPU -----------------------===//
+//
+// 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 "src/math/fmaximum.h"
+
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/optimization.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(double, fmaximum, (double x, double y)) {
+  return __builtin_fmaximum(x, y);
----------------
lntue wrote:

Let's remove all the specialization in `src/math/amdgpu` folder for now.

https://github.com/llvm/llvm-project/pull/86016


More information about the libc-commits mailing list