[2/2] benchtests: Add ilogbf128 test

Message ID 20201222153039.17722-2-rzinsly@linux.ibm.com
State Superseded
Headers
Series powerpc: Add optimized ilogbf128 for POWER9 |

Commit Message

Raphael M Zinsly Dec. 22, 2020, 3:30 p.m. UTC
  Add a benchtest to ilogbf128 based on the logb benchtests.
---
 benchtests/Makefile         |  2 +-
 benchtests/ilogbf128-inputs | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 benchtests/ilogbf128-inputs
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 5cd211ee9a..9c7d99ae66 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -28,7 +28,7 @@  bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
 	      exp10f
 
 ifneq (,$(filter yes,$(float128-fcts) $(float128-alias-fcts)))
-bench-math += expf128 powf128 sinf128
+bench-math += expf128 powf128 sinf128 ilogbf128
 endif
 
 bench-pthread := pthread_once thread_create pthread-locks
diff --git a/benchtests/ilogbf128-inputs b/benchtests/ilogbf128-inputs
new file mode 100644
index 0000000000..bfbfc93714
--- /dev/null
+++ b/benchtests/ilogbf128-inputs
@@ -0,0 +1,11 @@ 
+## args: _Float128
+## ret: int
+## includes: math.h
+
+## name: subnormal
+6.47517511943802511092443895822764655e-4966f128
+0x1.fffffffffffffff8p-16383f128
+
+## name: normal
+1.0
+-0x8.2faf442f390a9211f5af128673fp+0L