about summary refs log tree commit diff
path: root/benchtests/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-12-16 19:10:58 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-12-19 16:04:16 -0200
commit5d1f604a87214e133d0adf9dbd53891138b5276c (patch)
tree72dbeed71129a6bcae48aaf2445f3f4e10723c03 /benchtests/Makefile
parentb598e134773f7ac981b9407982714cf7d53877ee (diff)
downloadglibc-5d1f604a87214e133d0adf9dbd53891138b5276c.tar.gz
glibc-5d1f604a87214e133d0adf9dbd53891138b5276c.tar.xz
glibc-5d1f604a87214e133d0adf9dbd53891138b5276c.zip
benchtests: Add fmax/fmin benchmarks
This patch adds fmax and fmin benchtests.  It is based 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 fmin and fmax.
	(CFLAGS-bench-fmax.c): New rule.
	(CFLAGS-bench-fmin.c): New rule.
	* benchtests/fmax-inputs: New file.
	* benchtests/fmin-inputs: Likewise.
Diffstat (limited to 'benchtests/Makefile')
-rw-r--r--benchtests/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/benchtests/Makefile b/benchtests/Makefile
index ba4d06883a..2aad3c2703 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -24,7 +24,7 @@ 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
+	      modf pow rint sin sincos sinh sqrt tan tanh fmin fmax
 
 bench-pthread := pthread_once
 
@@ -73,6 +73,8 @@ benchset := $(string-benchset-all) $(stdlib-benchset) $(stdio-common-benchset) \
 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-fmax.c += -fno-builtin
 
 bench-malloc := malloc-thread