[libc-commits] [libc] a9628e9 - [libc] Add diff and perf targets for more math functions
Hedin GarcĂa via libc-commits
libc-commits at lists.llvm.org
Thu Aug 5 10:57:20 PDT 2021
Author: Hedin Garca
Date: 2021-08-05T17:57:04Z
New Revision: a9628e96ca5b3d264d88147494c82cb63e8ac973
URL: https://github.com/llvm/llvm-project/commit/a9628e96ca5b3d264d88147494c82cb63e8ac973
DIFF: https://github.com/llvm/llvm-project/commit/a9628e96ca5b3d264d88147494c82cb63e8ac973.diff
LOG: [libc] Add diff and perf targets for more math functions
Comparing the run time of math functions from LLVM libc
with the MSVCRT libc:
|function |perf-LLVM libc |perf-MSVCRT
|ceilf |2.36 mins (141491389600 ns)|47.10 sec (47100940100 ns)
|exp2f |6.37 mins (358441794700 ns)|12.39 mins (719404388300 ns)
|expf |6.35 mins (381204661800 ns)|6.17 mins (346150163200 ns)
|fabsf |1.18 mins (78425546600 ns) |53.75 sec (53745301900 ns)
|floorf |3.15 mins (164770963800 ns)|45.94 sec (45935988400 ns)
|logbf |4.38 mins (262508058800 ns)|55.47 sec (55466377700 ns)
|nearbyintf |3.20 mins (167972868000 ns)|9.13 mins (523822963600 ns)
|rintf |3.20 mins (168001498700 ns)|22.35 mins (1341266448800 ns)
|roundf |2.35 mins (141151500600 ns)|1.42 mins (85326429800 ns)
|truncf |2.31 mins (114846424000 ns)|59.41 sec (59414309100 ns)
Evaluating the number of differing results in Windows:
|function |diff
|ceilf |8388606 differing results
|exp2f |213303887 differing results
|expf |193922 differing results
|fabsf |8388606 differing results
|floorf |8388606 differing results
|logbf |0 differing results
|nearbyintf |0 differing results
|rintf |0 differing results
|roundf |0 differing results
|truncf |0 differing results
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D107462
Added:
libc/test/src/math/differential_testing/ceilf_diff.cpp
libc/test/src/math/differential_testing/ceilf_perf.cpp
libc/test/src/math/differential_testing/exp2f_diff.cpp
libc/test/src/math/differential_testing/exp2f_perf.cpp
libc/test/src/math/differential_testing/expf_diff.cpp
libc/test/src/math/differential_testing/expf_perf.cpp
libc/test/src/math/differential_testing/fabsf_diff.cpp
libc/test/src/math/differential_testing/fabsf_perf.cpp
libc/test/src/math/differential_testing/floorf_diff.cpp
libc/test/src/math/differential_testing/floorf_perf.cpp
libc/test/src/math/differential_testing/logbf_diff.cpp
libc/test/src/math/differential_testing/logbf_perf.cpp
libc/test/src/math/differential_testing/nearbyintf_diff.cpp
libc/test/src/math/differential_testing/nearbyintf_perf.cpp
libc/test/src/math/differential_testing/rintf_diff.cpp
libc/test/src/math/differential_testing/rintf_perf.cpp
libc/test/src/math/differential_testing/roundf_diff.cpp
libc/test/src/math/differential_testing/roundf_perf.cpp
libc/test/src/math/differential_testing/truncf_diff.cpp
libc/test/src/math/differential_testing/truncf_perf.cpp
Modified:
libc/test/src/math/differential_testing/CMakeLists.txt
libc/test/src/math/differential_testing/sqrtf_diff.cpp
libc/test/src/math/differential_testing/sqrtf_perf.cpp
Removed:
################################################################################
diff --git a/libc/test/src/math/
diff erential_testing/CMakeLists.txt b/libc/test/src/math/
diff erential_testing/CMakeLists.txt
index a986697996a5f..28304e00ab20c 100644
--- a/libc/test/src/math/
diff erential_testing/CMakeLists.txt
+++ b/libc/test/src/math/
diff erential_testing/CMakeLists.txt
@@ -127,6 +127,186 @@ add_
diff _binary(
-fno-builtin
)
+add_
diff _binary(
+ ceilf_
diff
+ SRCS
+ ceilf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.ceilf
+)
+
+add_
diff _binary(
+ ceilf_perf
+ SRCS
+ ceilf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.ceilf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ exp2f_
diff
+ SRCS
+ exp2f_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.exp2f
+)
+
+add_
diff _binary(
+ exp2f_perf
+ SRCS
+ exp2f_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.exp2f
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ expf_
diff
+ SRCS
+ expf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.expf
+)
+
+add_
diff _binary(
+ expf_perf
+ SRCS
+ expf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.expf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ fabsf_
diff
+ SRCS
+ fabsf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.fabsf
+)
+
+add_
diff _binary(
+ fabsf_perf
+ SRCS
+ fabsf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.fabsf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ floorf_
diff
+ SRCS
+ floorf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.floorf
+)
+
+add_
diff _binary(
+ floorf_perf
+ SRCS
+ floorf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.floorf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ logbf_
diff
+ SRCS
+ logbf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.logbf
+)
+
+add_
diff _binary(
+ logbf_perf
+ SRCS
+ logbf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.logbf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ nearbyintf_
diff
+ SRCS
+ nearbyintf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.nearbyintf
+)
+
+add_
diff _binary(
+ nearbyintf_perf
+ SRCS
+ nearbyintf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.nearbyintf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ rintf_
diff
+ SRCS
+ rintf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.rintf
+)
+
+add_
diff _binary(
+ rintf_perf
+ SRCS
+ rintf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.rintf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
+add_
diff _binary(
+ roundf_
diff
+ SRCS
+ roundf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.roundf
+)
+
+add_
diff _binary(
+ roundf_perf
+ SRCS
+ roundf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.roundf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
+
add_
diff _binary(
sqrtf_
diff
SRCS
@@ -146,3 +326,23 @@ add_
diff _binary(
COMPILE_OPTIONS
-fno-builtin
)
+
+add_
diff _binary(
+ truncf_
diff
+ SRCS
+ truncf_
diff .cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.truncf
+)
+
+add_
diff _binary(
+ truncf_perf
+ SRCS
+ truncf_perf.cpp
+ DEPENDS
+ .single_input_single_output_
diff
+ libc.src.math.truncf
+ COMPILE_OPTIONS
+ -fno-builtin
+)
diff --git a/libc/test/src/math/
diff erential_testing/ceilf_
diff .cpp b/libc/test/src/math/
diff erential_testing/ceilf_
diff .cpp
new file mode 100644
index 0000000000000..af911b4cc2622
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/ceilf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for ceilf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/ceilf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::ceilf, ::ceilf,
+ "ceilf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/ceilf_perf.cpp b/libc/test/src/math/
diff erential_testing/ceilf_perf.cpp
new file mode 100644
index 0000000000000..23420390d1534
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/ceilf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for ceilf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/ceilf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::ceilf, ::ceilf,
+ "ceilf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/exp2f_
diff .cpp b/libc/test/src/math/
diff erential_testing/exp2f_
diff .cpp
new file mode 100644
index 0000000000000..c1f279a2b466d
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/exp2f_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for exp2f----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/exp2f.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::exp2f, ::exp2f,
+ "exp2f_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/exp2f_perf.cpp b/libc/test/src/math/
diff erential_testing/exp2f_perf.cpp
new file mode 100644
index 0000000000000..2ffa593c9f6e4
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/exp2f_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for exp2f----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/exp2f.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::exp2f, ::exp2f,
+ "exp2f_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/expf_
diff .cpp b/libc/test/src/math/
diff erential_testing/expf_
diff .cpp
new file mode 100644
index 0000000000000..a69efde44c1ca
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/expf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for expf ----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/expf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::expf, ::expf,
+ "expf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/expf_perf.cpp b/libc/test/src/math/
diff erential_testing/expf_perf.cpp
new file mode 100644
index 0000000000000..1a28fd125af07
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/expf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for expf ----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/expf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::expf, ::expf,
+ "expf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/fabsf_
diff .cpp b/libc/test/src/math/
diff erential_testing/fabsf_
diff .cpp
new file mode 100644
index 0000000000000..6bf11f654c71c
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/fabsf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for fabsf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/fabsf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::fabsf, ::fabsf,
+ "fabsf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/fabsf_perf.cpp b/libc/test/src/math/
diff erential_testing/fabsf_perf.cpp
new file mode 100644
index 0000000000000..2fcf72de348e2
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/fabsf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for fabsf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/fabsf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::fabsf, ::fabsf,
+ "fabsf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/floorf_
diff .cpp b/libc/test/src/math/
diff erential_testing/floorf_
diff .cpp
new file mode 100644
index 0000000000000..788214fb26407
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/floorf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for floorf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/floorf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::floorf, ::floorf,
+ "floorf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/floorf_perf.cpp b/libc/test/src/math/
diff erential_testing/floorf_perf.cpp
new file mode 100644
index 0000000000000..498cdc960c66d
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/floorf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for floorf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/floorf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::floorf, ::floorf,
+ "floorf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/logbf_
diff .cpp b/libc/test/src/math/
diff erential_testing/logbf_
diff .cpp
new file mode 100644
index 0000000000000..93439c7fc8981
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/logbf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for logbf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/logbf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::logbf, ::logbf,
+ "logbf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/logbf_perf.cpp b/libc/test/src/math/
diff erential_testing/logbf_perf.cpp
new file mode 100644
index 0000000000000..38fa331d26644
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/logbf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for logbf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/logbf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::logbf, ::logbf,
+ "logbf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/nearbyintf_
diff .cpp b/libc/test/src/math/
diff erential_testing/nearbyintf_
diff .cpp
new file mode 100644
index 0000000000000..dfcf2fd1cc0e5
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/nearbyintf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for nearbyintf-----------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/nearbyintf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::nearbyintf, ::nearbyintf,
+ "nearbyintf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/nearbyintf_perf.cpp b/libc/test/src/math/
diff erential_testing/nearbyintf_perf.cpp
new file mode 100644
index 0000000000000..6ee98a967a706
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/nearbyintf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for nearbyintf-----------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/nearbyintf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::nearbyintf, ::nearbyintf,
+ "nearbyintf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/rintf_
diff .cpp b/libc/test/src/math/
diff erential_testing/rintf_
diff .cpp
new file mode 100644
index 0000000000000..2ed954dde5484
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/rintf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for rintf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/rintf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::rintf, ::rintf,
+ "rintf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/rintf_perf.cpp b/libc/test/src/math/
diff erential_testing/rintf_perf.cpp
new file mode 100644
index 0000000000000..517f04b688e56
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/rintf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for rintf----------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/rintf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::rintf, ::rintf,
+ "rintf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/roundf_
diff .cpp b/libc/test/src/math/
diff erential_testing/roundf_
diff .cpp
new file mode 100644
index 0000000000000..803566a9e4b84
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/roundf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for roundf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/roundf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::roundf, ::roundf,
+ "roundf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/roundf_perf.cpp b/libc/test/src/math/
diff erential_testing/roundf_perf.cpp
new file mode 100644
index 0000000000000..51be6f187e26b
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/roundf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for roundf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/roundf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::roundf, ::roundf,
+ "roundf_perf.log")
diff --git a/libc/test/src/math/
diff erential_testing/sqrtf_
diff .cpp b/libc/test/src/math/
diff erential_testing/sqrtf_
diff .cpp
index 7081c0b2e4877..3fdcf930d2582 100644
--- a/libc/test/src/math/
diff erential_testing/sqrtf_
diff .cpp
+++ b/libc/test/src/math/
diff erential_testing/sqrtf_
diff .cpp
@@ -1,5 +1,4 @@
-//===-- Differential test for sqrtf
-//----------------------------------------===//
+//===-- Differential test for sqrtf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/libc/test/src/math/
diff erential_testing/sqrtf_perf.cpp b/libc/test/src/math/
diff erential_testing/sqrtf_perf.cpp
index 29b6d5fcfcf12..d3ceb9d46fb27 100644
--- a/libc/test/src/math/
diff erential_testing/sqrtf_perf.cpp
+++ b/libc/test/src/math/
diff erential_testing/sqrtf_perf.cpp
@@ -1,5 +1,4 @@
-//===-- Differential test for sqrtf
-//----------------------------------------===//
+//===-- Differential test for sqrtf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/libc/test/src/math/
diff erential_testing/truncf_
diff .cpp b/libc/test/src/math/
diff erential_testing/truncf_
diff .cpp
new file mode 100644
index 0000000000000..30ed0fab1d898
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/truncf_
diff .cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for truncf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/truncf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_DIFF(float, __llvm_libc::truncf, ::truncf,
+ "truncf_
diff .log")
diff --git a/libc/test/src/math/
diff erential_testing/truncf_perf.cpp b/libc/test/src/math/
diff erential_testing/truncf_perf.cpp
new file mode 100644
index 0000000000000..f5cee930003ea
--- /dev/null
+++ b/libc/test/src/math/
diff erential_testing/truncf_perf.cpp
@@ -0,0 +1,16 @@
+//===-- Differential test for truncf---------------------------------------===//
+//
+// 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 "SingleInputSingleOutputDiff.h"
+
+#include "src/math/truncf.h"
+
+#include <math.h>
+
+SINGLE_INPUT_SINGLE_OUTPUT_PERF(float, __llvm_libc::truncf, ::truncf,
+ "truncf_perf.log")
More information about the libc-commits
mailing list