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: 161430 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2050506jan; Fri, 29 Mar 2019 06:37:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxoTCRE4RdphSiyaP+3tv9phb4ueIA5kmv1zfgyh3EyZdV1STEdghmX04BCJC44pVtTO7d X-Received: by 2002:a17:902:599d:: with SMTP id p29mr13891012pli.156.1553866651874; Fri, 29 Mar 2019 06:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553866651; cv=none; d=google.com; s=arc-20160816; b=Ht5YuYPnFrFf58a7leWL8tRtqgR8qLR0NelIldrVAov0fhBW4bk+sT5ei8JVq3WM82 GRIIhhzG1ncAOQ5x/GBzVNv/I7bZ+yU7AE6mLhZ5W+Xk5yt/cG8w/NtbLFTeHmu65EIL 07F3VCNFD9BeDwWBRVmqGK1fG1NEqyGCqYpRtTOOfpqaV/oPdqVVneGz587gIFHaCVEE OX1VaJXNLTQiRYOq4X4oQQH4X2vLTY57N4S8VzWrQQS8/oqBmAkis+dklnVox56T00ej MH02OwwPHfX+0kw0AMIC4nAx4RurcSnFtuiD49xDFjdEA77aqswzwFlsQi2tiy9ndhpp BCCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=u/k0wby2Ymif5gYMnVtSF/mDZLo0yU97s3/DQStpuPs=; b=oHL0KqEzBaDTbYe1dGKPZ5wdCNbD2EH29EXUBVsyaG2vk/3XW9qIUPQVTfwaNWgBUS bjlsABt+GYpnF/wsHn9y+BE7nTqYeWfvMsoHva510dQWDAtk+025IVbRj+ot6uFCgA3U 1A+pst3kz5KHJ299Aymn4Ly9JXfujxGc6YHhH+w5pR5iP4IPajl75M+9ZbOENqJFnFzO s+tXn6qqagBy7xIIMGdfIv3mIlWn4QY9rlP5Lw/X3qk4vJhyaJe0OCfD8NQFArKvRjft SrdHWZjPgufoijWHVO3vZGxoCA1RuNjaKHRk5oHRhQu2t9124sZCMPA+KKqnmClwMtnq Zj4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=uqloKmby; dkim=pass header.i=@linaro.org header.s=google header.b=zLdEQ3PP; spf=pass (google.com: domain of libc-alpha-return-100999-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100999-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id y9si1787392pgg.15.2019.03.29.06.37.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2019 06:37:31 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-100999-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=uqloKmby; dkim=pass header.i=@linaro.org header.s=google header.b=zLdEQ3PP; spf=pass (google.com: domain of libc-alpha-return-100999-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100999-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=xZUGPP+vSZsz/Ru4VpVF3sefe8N6k1u c6G9w2Y2rBxtx0VFdsFobs2elXTU8c56SXUpsnHKBXirnzospHC97JUSyR5bnX5j oNlNYELiWxRPDd1zV+NMGZ+OsZmbHD3KRtqpw/IqJf+LNI/EGEd4RA/Rduu4eLqt OvNpDEvVkgtU= 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=uqloK mby5chMKOIN/WyvWP8AODgEgQTg/i/HeNN3EKCDtNDeZ9BDRwU12wSMl/fBNZavV JCvjRn0bqLzYW8b+Gyp8MiaDonBPBkqoQQWTaEpe1Q7l5upyMcT9IKD3K5i/yJV8 bE0aAIZqgy1T/6gOr1RkO47mc2weZ+vATC6o68= 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== Return-Path: 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 -- 2.17.1 Reviewed-by: Gabriel F. T. Gomes 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 ("")