[libc-commits] [libc] [libc][math][c23] add performance tests for fmul (PR #106262)

via libc-commits libc-commits at lists.llvm.org
Tue Aug 27 21:09:28 PDT 2024


================
@@ -0,0 +1,33 @@
+//===-- Performance test for maximum and minimum functions ----------------===//
+//
+// 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 "BinaryOpSingleOutputPerf.h"
+#include "src/math/fmul.h"
+#include "src/math/fmull.h"
+#include <math.h>
+
+static constexpr size_t DOUBLE_ROUNDS = 40;
+static constexpr size_t LONG_DOUBLE_ROUNDS = 40;
+
+float fmul_placeholder_binary(double x, double y) {
+  return static_cast<float>(x * y);
+}
+
+float fmull_placeholder_binary(long double x, long double y) {
----------------
lntue wrote:

Move `fmull` to its own `fmull_perf` test.

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


More information about the libc-commits mailing list