From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5D30220248 for ; Fri, 29 Mar 2019 13:37:23 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=IdmGegVn7u43EE04Jmp+Dkgg7BWzuln vB3lD5vc+i6k3OgKzSny6ZeE2D/gY9gpkm453EYFdRNBsMzxdpysetpiNy1EmhNq 3vDe5bejZMVD1sPIZAhbHdicbSA+XIupOeZv4PmzI+cNNu9j8Z7TqrHb4A6cOYxa fuwJsdgQnwqI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=TOPYWmbgkXFpnTIZ1X+xDE/P+VY=; b=b3Xmc 5HtZ7eS9dDn6pMCBUknEmUetpN5VIbL5PnZrKgs4bdLjYil6TkCK/sXLcEmgc5iK axDduyavA+MdDBi3t1c7M3i/ls5qdrh66mklM8mT5/2/PURTkhruA1cnlVUxaX5U hY2AnftH/2B+6T4E/d5iXIwz7fxbUK5QOSObT8= Received: (qmail 119505 invoked by alias); 29 Mar 2019 13:35:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 119421 invoked by uid 89); 29 Mar 2019 13:35:54 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vs1-f44.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=u/k0wby2Ymif5gYMnVtSF/mDZLo0yU97s3/DQStpuPs=; b=zLdEQ3PP76A5YRG3FkI5pns+cmUlnBEg8O54z8NOsponVpH1Jsdr5EMPbZm3oj6e/2 h4V6MrnXJKpF+WwVHfFbR6faRom+/hFT9h//wteIkoaGvb3i5Z2ulcd2giqq5JsCvHdR w/PSSVuYHHzkj05DOyhIQcY9G2dJHksEK+t6X+OWNVlSjiWoOsNuYOf7VFsCew1bxaq7 SxZ7nEBjVkKMjVxSYKUsB72S8xarC956bY+zYMawFm3EZRrpjp1Vw27tx1QbE995jQQa u5SaZGdSa6Uh4D69MrbdEleX4MYHg6GCK7Mfyc48gy+Omu0k9HnNPrNCUJ8mBYTU8jDZ yllQ== From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 11/28] benchtests: Add isnan/isinf/isfinite benchmark Date: Fri, 29 Mar 2019 10:35:12 -0300 Message-Id: <20190329133529.22523-12-adhemerval.zanella@linaro.org> In-Reply-To: <20190329133529.22523-1-adhemerval.zanella@linaro.org> References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * benchtests/Makefile (bench-math): Add isnan, isinf, and isfinite. (CFLAGS-bench-isnan.c, CFLAGS-bench-isinf.c, CFLAGS-bench-isfinite.c): New rule. * benchtests/isnan-input: New file. * benchtests/isinf-input: New file. * benchtests/isfinite-input: New file. --- benchtests/Makefile | 5 ++++- benchtests/isfinite-inputs | 21 +++++++++++++++++++++ benchtests/isinf-inputs | 21 +++++++++++++++++++++ benchtests/isnan-inputs | 21 +++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 benchtests/isfinite-inputs create mode 100644 benchtests/isinf-inputs create mode 100644 benchtests/isnan-inputs diff --git a/benchtests/Makefile b/benchtests/Makefile index cdc89488d6..42bf13b27f 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -24,7 +24,7 @@ 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 fminf \ fmaxf powf trunc truncf expf exp2f logf log2f sincosf sinf \ - cosf + cosf isnan isinf isfinite bench-pthread := pthread_once thread_create @@ -88,6 +88,9 @@ CFLAGS-bench-fmax.c += -fno-builtin CFLAGS-bench-fmaxf.c += -fno-builtin CFLAGS-bench-trunc.c += -fno-builtin CFLAGS-bench-truncf.c += -fno-builtin +CFLAGS-bench-isnan.c += -fsignaling-nans +CFLAGS-bench-isinf.c += -fsignaling-nans +CFLAGS-bench-isfinite.c += -fsignaling-nans ifeq (${BENCHSET},) bench-malloc := malloc-thread malloc-simple diff --git a/benchtests/isfinite-inputs b/benchtests/isfinite-inputs new file mode 100644 index 0000000000..35a887c9df --- /dev/null +++ b/benchtests/isfinite-inputs @@ -0,0 +1,21 @@ +## includes: math.h +## args: double +## ret: int +0.9 +2.3 +3.7 +3.9 +4.0 +4.7 +5.9 +0x1.000000cf4a2a1p0 +0x1.0000010b239a8p0 +0x1.00000162a932ap0 +0x1.000002d452a11p0 +0x1.000005bc7d86cp0 +## name: INF +__builtin_inf () +-__builtin_inf () +## name: NAN +__builtin_nan ("") +__builtin_nans ("") diff --git a/benchtests/isinf-inputs b/benchtests/isinf-inputs new file mode 100644 index 0000000000..35a887c9df --- /dev/null +++ b/benchtests/isinf-inputs @@ -0,0 +1,21 @@ +## includes: math.h +## args: double +## ret: int +0.9 +2.3 +3.7 +3.9 +4.0 +4.7 +5.9 +0x1.000000cf4a2a1p0 +0x1.0000010b239a8p0 +0x1.00000162a932ap0 +0x1.000002d452a11p0 +0x1.000005bc7d86cp0 +## name: INF +__builtin_inf () +-__builtin_inf () +## name: NAN +__builtin_nan ("") +__builtin_nans ("") diff --git a/benchtests/isnan-inputs b/benchtests/isnan-inputs new file mode 100644 index 0000000000..35a887c9df --- /dev/null +++ b/benchtests/isnan-inputs @@ -0,0 +1,21 @@ +## includes: math.h +## args: double +## ret: int +0.9 +2.3 +3.7 +3.9 +4.0 +4.7 +5.9 +0x1.000000cf4a2a1p0 +0x1.0000010b239a8p0 +0x1.00000162a932ap0 +0x1.000002d452a11p0 +0x1.000005bc7d86cp0 +## name: INF +__builtin_inf () +-__builtin_inf () +## name: NAN +__builtin_nan ("") +__builtin_nans ("") -- 2.17.1