xref: /llvm-project/libc/test/src/math/performance_testing/fmull_perf.cpp (revision 1ace91f925ad87c3e5eb836ad58fdffe60c4aea6)
1 //===-- Performance test for the fmull function ---------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "BinaryOpSingleOutputPerf.h"
10 #include "src/math/fmull.h"
11 
12 static constexpr size_t LONG_DOUBLE_ROUNDS = 40;
13 
14 float fmull_placeholder_binary(long double x, long double y) {
15   return static_cast<float>(x * y);
16 }
17 
18 int main() {
19   BINARY_OP_SINGLE_OUTPUT_PERF_EX(float, long double, LIBC_NAMESPACE::fmull,
20                                   fmull_placeholder_binary, LONG_DOUBLE_ROUNDS,
21                                   "fmull_perf.log")
22   return 0;
23 }
24