[libc] Add implementations of fmax, fmaxf, and fmaxl.

Summary: Add implementations of fmax, fmaxf, and fmaxl.

Reviewers: sivachandra

Subscribers: mgorny, tschuett, libc-commits, ecnelises

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D84385
diff --git a/libc/src/math/fmaxf.cpp b/libc/src/math/fmaxf.cpp
new file mode 100644
index 0000000..5562904
--- /dev/null
+++ b/libc/src/math/fmaxf.cpp
@@ -0,0 +1,18 @@
+//===-- Implementation of fmaxf function ----------------------------------===//
+//
+// 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/__support/common.h"
+#include "utils/FPUtil/BasicOperations.h"
+
+namespace __llvm_libc {
+
+float LLVM_LIBC_ENTRYPOINT(fmaxf)(float x, float y) {
+  return fputil::fmax(x, y);
+}
+
+} // namespace __llvm_libc