about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--benchtests/Makefile5
-rw-r--r--benchtests/fmaxf-inputs23
-rw-r--r--benchtests/fminf-inputs23
4 files changed, 56 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 819c09b164..c2bb608c0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-12-19  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* 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/Makefile (bench-math): Add fmin and fmax.
 	(CFLAGS-bench-fmax.c): New rule.
 	(CFLAGS-bench-fmin.c): Likewise.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 2aad3c2703..f5d6dac6c7 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -24,7 +24,8 @@ subdir := benchtests
 
 include ../Makeconfig
 bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
-	      modf pow rint sin sincos sinh sqrt tan tanh fmin fmax
+	      modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
+	      fmaxf
 
 bench-pthread := pthread_once
 
@@ -74,7 +75,9 @@ CFLAGS-bench-ffs.c += -fno-builtin
 CFLAGS-bench-ffsll.c += -fno-builtin
 CFLAGS-bench-sqrt.c += -fno-builtin
 CFLAGS-bench-fmin.c += -fno-builtin
+CFLAGS-bench-fminf.c += -fno-builtin
 CFLAGS-bench-fmax.c += -fno-builtin
+CFLAGS-bench-fmaxf.c += -fno-builtin
 
 bench-malloc := malloc-thread
 
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 ("")
diff --git a/benchtests/fminf-inputs b/benchtests/fminf-inputs
new file mode 100644
index 0000000000..7eb7bda5e4
--- /dev/null
+++ b/benchtests/fminf-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 ("")