From da16c9b524908fe0353efc4af8eab6a5ad5ea50b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 19 Dec 2016 11:00:45 -0200 Subject: benchtests: Add fmaxf/fminf benchmarks This patch adds fmaxf and fminf benchtests. It is based on math/s_fmax_template.c implementation which checks for basically four different classes: 1. if x is greater or equal than y. 2. if x is less than y. 3. if x or y is signaling. 4. if y is nan. Cases 1 and 2 are used for default input number (by mixing normal double numbers and infinity), while case 3 and 4 are used each for on for a benchmark class. Checked on x86_64-linux-gnu and powerpc64-linux-gnu. * benchtests/Makefile (bench-math): Add fminf and fmaxf. (CFLAGS-bench-fmaxf.c): New rule. (CFLAGS-bench-fminf.c): Likewise. * benchtests/fmaxf-inputs: New file. * benchtests/fminf-inputs: Likewise. --- benchtests/fmaxf-inputs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 benchtests/fmaxf-inputs (limited to 'benchtests/fmaxf-inputs') diff --git a/benchtests/fmaxf-inputs b/benchtests/fmaxf-inputs new file mode 100644 index 0000000000..7eb7bda5e4 --- /dev/null +++ b/benchtests/fmaxf-inputs @@ -0,0 +1,23 @@ +## includes: math.h +## args: float:float +## ret: float +78.5f, -78.5f +-78.5f, 78.5f +0.0f, 78.5f +78.5f, 0.0f +0.0f, -78.5f +-78.5, 0.0f +__builtin_inff (), 78.5f +__builtin_inff (), -78.5f +78.5f, __builtin_inff () +-78.5f, __builtin_inff () +## name: qNaN +__builtin_nanf (""), 78.5f +__builtin_nanf (""), -78.5f +78.5f, __builtin_nanf ("") +-78.5f, __builtin_nanf ("") +## name: sNaN +__builtin_nansf (""), 78.5f +__builtin_nansf (""), -78.5f +78.5f, __builtin_nansf ("") +-78.5f, __builtin_nansf ("") -- cgit 1.4.1