From patchwork Fri Nov 1 14:02:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Youdkevitch X-Patchwork-Id: 1188054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512220-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bell-sw.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="f7mLzjeq"; dkim=pass (1024-bit key; unprotected) header.d=bell-sw.com header.i=@bell-sw.com header.b="M4C/vtA0"; 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 474P6S26bYz9sP4 for ; Sat, 2 Nov 2019 01:03:10 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=nH4sW2WpMPRFiO43YVJQe9bvp92EEAw0uadhuMHOGW1c6V3GM2J1m 8ablkOxHetRkm9JYDWhwaVKTT6fkurSLgFV+YDeTdomSV9049MUA7XYa7d1prPyQ 84B0MR+C4j4nK1OOBi06epfIJRoSOLLSQVYoGn/mNugMmI3SywG2TM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=uhU/27NTMAuQmy4h2ginVY+l0ao=; b=f7mLzjeqqxpMRqmyCRhO l7uOqgEGGhDVQbz466dCUV7GWDdL6F79lqebjhtB1iGJqJAecHAXw6E0Ea3D6Ouw Km96XmVMkud28BKLGsvrTknViLXQPjXmdjvVuqddlj1ZSQmgC1X8WHpUTtgO6Pjx nAVf15dw7ZR06qUhMJWZAlM= Received: (qmail 35805 invoked by alias); 1 Nov 2019 14:03:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 35796 invoked by uid 89); 1 Nov 2019 14:03:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1522, aarch64.c, UD:aarch64.c, aarch64c X-HELO: forward104o.mail.yandex.net Received: from forward104o.mail.yandex.net (HELO forward104o.mail.yandex.net) (37.140.190.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Nov 2019 14:03:00 +0000 Received: from mxback28j.mail.yandex.net (mxback28j.mail.yandex.net [IPv6:2a02:6b8:0:1619::228]) by forward104o.mail.yandex.net (Yandex) with ESMTP id CB1D4941550 for ; Fri, 1 Nov 2019 17:02:56 +0300 (MSK) Received: from vla5-63eb7479a3c9.qloud-c.yandex.net (vla5-63eb7479a3c9.qloud-c.yandex.net [2a02:6b8:c18:3411:0:640:63eb:7479]) by mxback28j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dozmda6DiC-2uR4kJ4i; Fri, 01 Nov 2019 17:02:56 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bell-sw.com; s=mail; t=1572616976; bh=BAczZSQVuyuPsES5ZVcq/WR8aTk6EunYGYGyh8thb8I=; h=Subject:To:From:Date:Message-ID; b=M4C/vtA023KAtvws8MCAS7XRxHzYd+7pG5NFm8yM5g4IsPzQf2IKBu9OOqUWCCVdL 5QMOLGBxP1Ba2iUsiBwQ2aziYxZM2iGjmC80SYLWLbcnefzBU7COPQ0hv3Ug6SaOWv 1JlC06mPkrfSEi42XMdj/N39j4NcDEC/PrIs6U9Y= Authentication-Results: mxback28j.mail.yandex.net; dkim=pass header.i=@bell-sw.com Received: by vla5-63eb7479a3c9.qloud-c.yandex.net (nwsmtp/Yandex) with ESMTPSA id Ea5x7sIQ5l-2sWiXReo; Fri, 01 Nov 2019 17:02:55 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Date: Fri, 1 Nov 2019 17:02:49 +0300 From: Anton Youdkevitch To: gcc-patches@gcc.gnu.org Subject: [PATCH][Aarch64] Fix vec_perm cost for thunderx2t99 Message-ID: <20191101140242.GA7200@bell-sw.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hello, Here is the one-liner that fixes the incorrect vec_perm cost for thunderx2t99 chip. With the patch applied 526.blender of CPU2017 gets ~5% improvement with no measurable changes for other benchmarks. Bootstrapped OK on aarch64-linux-gnu. OK for trunk? 2019-11-01 Anton Youdkevitch * gcc/config/aarch64/aarch64.c (thunderx2t99_vector_cost): change vec_perm field From 42eab5c85a39a5c5ed7be00245f13f73c3f6b946 Mon Sep 17 00:00:00 2001 From: Anton Youdkevitch Date: Wed, 30 Oct 2019 14:42:41 +0000 Subject: [PATCH] [Aarch64] Fix vec_perm cost for thunderx2t99 The vec_perm cost for thunderx2t99 was set to 3 which was too low and resulted in non-beneficial permutations neing generated. Changed it to 10 (2-register form tbl cost) to more accurately represent the timings wrt the actual TX2 hardware. --- gcc/config/aarch64/aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 599d07a..f28fe80 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -585,7 +585,7 @@ static const struct cpu_vector_cost thunderx2t99_vector_cost = 1, /* scalar_store_cost */ 5, /* vec_int_stmt_cost */ 6, /* vec_fp_stmt_cost */ - 3, /* vec_permute_cost */ + 10, /* vec_permute_cost */ 6, /* vec_to_scalar_cost */ 5, /* scalar_to_vec_cost */ 8, /* vec_align_load_cost */ -- 2.7.4