From patchwork Fri Mar 29 13:35:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1069660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-100999-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ydUAZsHT"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zLdEQ3PP"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 44W2pv3Zgbz9sNy for ; Sat, 30 Mar 2019 00:37:27 +1100 (AEDT) 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=BFl/LuWTYrIXvQj8M95OOh3XQ6NhRyy nKbflVpRCgVSL2n/VjyrIRI0NjUCPS87zUjU2zSooEHrEDwdPAPE6TTC2pcBvfms dsmWs+kITyekVVVWXkRKYb2DGvK7krs3opdQJXJT1xRsAO1UxO/C9j/sM3jx+Ys7 oDfSK9jvONqo= 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=ydUAZ sHT1Y0bL8LzsG7K70yBCrBUtiuUp52LzBcLTN/Ywfyl9n+ETt6pI5Qx3MgQiAryV IXkqjU4tU7vk3qulx1qWR2V7N79EVr3x2A4iqhC86iM/d0dUMvDVcd+4rF17VxCq N6ML0iKgrQH4ae4snjmmAcabvUakDQiHNKZbO0= 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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 119421 invoked by uid 89); 29 Mar 2019 13:35:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=nan, log2 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. Reviewed-by: Gabriel F. T. Gomes --- 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 ("")