[libc-commits] [libc] [libc][math][c23] add c23 floating point fmaximum and fminimum fns (PR #86016)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Mar 20 15:01:11 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);
----------------
michaelrj-google wrote:
do the GPUs need these builtins right now or would it be easier to add this support later and just add the generic implementations for now. This patch is already rather large so shrinking the scope would be helpful for review.
https://github.com/llvm/llvm-project/pull/86016
More information about the libc-commits
mailing list