From patchwork Mon Dec 19 14:04:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 88475 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1173863qgi; Mon, 19 Dec 2016 06:05:20 -0800 (PST) X-Received: by 10.99.175.69 with SMTP id s5mr29056660pgo.6.1482156320406; Mon, 19 Dec 2016 06:05:20 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d85si18478513pfb.163.2016.12.19.06.05.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Dec 2016 06:05:20 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76077-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; spf=pass (google.com: domain of libc-alpha-return-76077-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76077-patch=linaro.org@sourceware.org; dmarc=fail (p=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=tvuUbOtnaQRjjNPt94ATlUOf5YdjAiM +wsS3MfP1IpO1qh9FNrQMjarbyJ1NfN1Att61yUpZ2ryvafWEjiroeZVxqVDM/NB TmXwOWbjVBdZg8bFDdmjHG9ZzrkSoZtz7Xowg2OWRkp7vdtwD2e4cOCMKfbibzbb QMEFkit20/k8= 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=jig0y/8zyBeJLGdgosA3oYEiIKM=; b=RlCpV G5BUVFpKU3omV1MOow6ncjt4UxHGXI/pQIv8PQBwmDwov2Mp58h5d7ABFrJIumez 0252rA7PE6IthhKfSZjmqFNNHa8jcN2MJuATkFIbgFLYI1QcQw5LAN3gEVVNF7BO rxe9gytYCql6vYw1QgmKtoYLG5zLS4OULPxn5s= Received: (qmail 116021 invoked by alias); 19 Dec 2016 14:04:44 -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 115891 invoked by uid 89); 19 Dec 2016 14:04:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sinh, tan, benchtests, cosh X-HELO: mail-yw0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=DOy5ySfWpB+Qh1NJ05ePojov0kO0Wi0jtBrrsBtx2gA=; b=NKjHSY79EfuucpU+EYgVIw8jKaQvaxRobX7e3Pf0WjmZVDHubR31Uj/1438b4+wAqe VxTKSUJgYeP9Z788mtHno61OEiXJjB3TwUtw+heme0TKcbBrpbqqPwqtP0iNJYqlBhx2 NzTqfgxVF6p4ZbGFSlhot1wYxNZ744VQNXHmLOjncjFv1gZc5Xs4t28ICQMfbasPg+Mm Pr4uaKjC87T/boGrB8iIfkm5jkMFWvA1o2CzOzADXTEh7nMq7QKH3+WTZ9uij8HDMF/w o3yeRWbLx3nX8a8r8nHy2Vg/SG36gSxHeEPJBaXegOGJM15xJTdh70H/ThJXsvBmRl1C oGtw== X-Gm-Message-State: AKaTC00mmY05t7Pi8UVOj5l+0T07HMkT16GcJXL6zi5STv7wHfxZ+x/WJW6ArEShL325624W X-Received: by 10.129.34.130 with SMTP id i124mr12550428ywi.114.1482156273165; Mon, 19 Dec 2016 06:04:33 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/4] benchtests: Add fmaxf/fminf benchmarks Date: Mon, 19 Dec 2016 12:04:22 -0200 Message-Id: <1482156263-22267-3-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1482156263-22267-1-git-send-email-adhemerval.zanella@linaro.org> References: <1482156263-22267-1-git-send-email-adhemerval.zanella@linaro.org> This patch adds fmaxf and fminf benchtests. It is based on 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 fminf and fmaxf. * benchtests/fmaxf-inputs: New file. * benchtests/fminf-inputs: Likewise. --- ChangeLog | 4 ++++ benchtests/Makefile | 3 ++- benchtests/fmaxf-inputs | 23 +++++++++++++++++++++++ benchtests/fminf-inputs | 23 +++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 benchtests/fmaxf-inputs create mode 100644 benchtests/fminf-inputs -- 2.7.4 diff --git a/benchtests/Makefile b/benchtests/Makefile index a3b53e1..9e5f6c6 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -24,7 +24,8 @@ 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 fmin fmax + modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \ + fmaxf bench-pthread := pthread_once diff --git a/benchtests/fmaxf-inputs b/benchtests/fmaxf-inputs new file mode 100644 index 0000000..7eb7bda --- /dev/null +++ b/benchtests/fmaxf-inputs @@ -0,0 +1,23 @@ +## includes: math.h +## args: float:float +## ret: float +78.5f, -78.5f +-78.5f, 78.5f +0.0f, 78.5f +78.5f, 0.0f +0.0f, -78.5f +-78.5, 0.0f +__builtin_inff (), 78.5f +__builtin_inff (), -78.5f +78.5f, __builtin_inff () +-78.5f, __builtin_inff () +## name: qNaN +__builtin_nanf (""), 78.5f +__builtin_nanf (""), -78.5f +78.5f, __builtin_nanf ("") +-78.5f, __builtin_nanf ("") +## name: sNaN +__builtin_nansf (""), 78.5f +__builtin_nansf (""), -78.5f +78.5f, __builtin_nansf ("") +-78.5f, __builtin_nansf ("") diff --git a/benchtests/fminf-inputs b/benchtests/fminf-inputs new file mode 100644 index 0000000..7eb7bda --- /dev/null +++ b/benchtests/fminf-inputs @@ -0,0 +1,23 @@ +## includes: math.h +## args: float:float +## ret: float +78.5f, -78.5f +-78.5f, 78.5f +0.0f, 78.5f +78.5f, 0.0f +0.0f, -78.5f +-78.5, 0.0f +__builtin_inff (), 78.5f +__builtin_inff (), -78.5f +78.5f, __builtin_inff () +-78.5f, __builtin_inff () +## name: qNaN +__builtin_nanf (""), 78.5f +__builtin_nanf (""), -78.5f +78.5f, __builtin_nanf ("") +-78.5f, __builtin_nanf ("") +## name: sNaN +__builtin_nansf (""), 78.5f +__builtin_nansf (""), -78.5f +78.5f, __builtin_nansf ("") +-78.5f, __builtin_nansf ("")