From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 26A873858D39 for ; Mon, 27 Mar 2023 09:13:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26A873858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ed1-x532.google.com with SMTP id ek18so33018013edb.6 for ; Mon, 27 Mar 2023 02:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1679908402; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s0vOJ5O8sstdSWJqrx6ZNb/ynZSKlObt6JXecPMx+nU=; b=kdVap67dpUA0tuhRG9sB9MSJOEd/zN/YxJmBFJDV8HvDdPvPNV+eOZF5cPwFJv8hVO EZbH4ckEPp8WB0CSdqs/yDwtul+VxDE59ru28GK4lrP/B/sgXGFMdgRhhZdJ8TujxZj2 iRR3G4mJsqttnFgXj+8U2kQY1XZgwbHv7RsU2MH5shpYTXO8kOimk9FoesEGFbrqbMzH 6NAVY5bBzidEFey0eu+0T5KHkG+qF4fWwWzBnfu0jdb3GS/JBzgEfYwo/FpAqRFC6JZ0 rM+5uMlr7ZzvaHyjaE51xFAx7xUjs+wHlVs+9Pj/3sqnYdQbpDT1Q83lkc5QRQiEDPTq 4tJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679908402; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s0vOJ5O8sstdSWJqrx6ZNb/ynZSKlObt6JXecPMx+nU=; b=Rp1X4QEmdfNx09O4kQOiUsfcWbIRP0CStlyB+/wd52layiMSWSQIWpQLupyG7rb8bA ihkEe1FPk36NuTcAhfWw8GwFSymOHgvd7RQMbaZ9A0azdmWs/S9KQWhq/sTQWutfU2jm Jws0DZPFGmFlwyBKNgY4MkVXio4IY1TI6yCtN7UpL9HQ1KMedZJ+FMjHhXEuBdCIv4ib TGDhp6GnDVHYsAZBEQbbVmniyIh3fR7wvynSUp1hoyYRm4lY2M4AjonxpD6knl3bfdFo MXzN9RJ4vrulhq3keljglEJtnABzJ/sCDDWZVet7Nc/3dESgBzaNKbQNXA8OmegibD26 GPvg== X-Gm-Message-State: AAQBX9duvwm03Jefn7OAn8gFjddGzYV2tBm4hwTI2oYt3f05e7EbP2gT 1gUs+v6UqQ2+kzJKuHux0WQXSC0Z04SUsCn+vYEvoQ== X-Google-Smtp-Source: AKy350bpDPiCaf60P5/+3LRodTDbmX76uleYZWcfmB3xz2FGePYp6xvhnsgBBewXR1hjN+b9Y2zYRszSHRP33XXpliE= X-Received: by 2002:a50:bb62:0:b0:4fa:ce07:639f with SMTP id y89-20020a50bb62000000b004face07639fmr5346869ede.5.1679908402411; Mon, 27 Mar 2023 02:13:22 -0700 (PDT) MIME-Version: 1.0 References: <20230327074654.1126912-1-philipp.tomsich@vrull.eu> In-Reply-To: From: Philipp Tomsich Date: Mon, 27 Mar 2023 17:13:11 +0800 Message-ID: Subject: Re: [PATCH] aarch64: update ampere1 vectorization cost To: Kyrylo Tkachov Cc: "gcc-patches@gcc.gnu.org" , Richard Sandiford , Tamar Christina , Manolis Tsamis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied to master, thanks! Philipp. On Mon, 27 Mar 2023 at 16:45, Kyrylo Tkachov wrote: > > Hi Philipp, > > > -----Original Message----- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Philipp > > Tomsich > > Sent: Monday, March 27, 2023 8:47 AM > > To: gcc-patches@gcc.gnu.org > > Cc: Richard Sandiford ; Tamar Christina > > ; Philipp Tomsich ; > > Manolis Tsamis > > Subject: [PATCH] aarch64: update ampere1 vectorization cost > > > > The original submission of AmpereOne (-mcpu=ampere1) costs occurred > > prior to exhaustive testing of vectorizable workloads against > > hardware. > > > > Adjust the vector costs to achieve the best results and more closely > > match the underlying hardware. > > > > gcc/ChangeLog: > > > > * config/aarch64/aarch64.cc: Update vector costs for ampere1. > > > > Co-Authored-By: Manolis Tsamis > > > > Signed-off-by: Philipp Tomsich > > --- > > We would like to get this into GCC 13 to avoid having to backport at > > the start of the next cycle. > > > > Given this affects only the ampere1 costs that sounds fine to me and fairly low risk, you are being trusted that these costs are actually desirable and properly validated on the hardware involved. > > > OK for backports? > > This is ok for trunk (GCC 13). Do you also want to backport this to other branches? > Thanks, > Kyrill > > > > > gcc/config/aarch64/aarch64.cc | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc > > index b27f4354031..661fff65cea 100644 > > --- a/gcc/config/aarch64/aarch64.cc > > +++ b/gcc/config/aarch64/aarch64.cc > > @@ -1132,7 +1132,7 @@ static const struct cpu_vector_cost > > thunderx3t110_vector_cost = > > > > static const advsimd_vec_cost ampere1_advsimd_vector_cost = > > { > > - 3, /* int_stmt_cost */ > > + 1, /* int_stmt_cost */ > > 3, /* fp_stmt_cost */ > > 0, /* ld2_st2_permute_cost */ > > 0, /* ld3_st3_permute_cost */ > > @@ -1148,17 +1148,17 @@ static const advsimd_vec_cost > > ampere1_advsimd_vector_cost = > > 8, /* store_elt_extra_cost */ > > 6, /* vec_to_scalar_cost */ > > 7, /* scalar_to_vec_cost */ > > - 5, /* align_load_cost */ > > - 5, /* unalign_load_cost */ > > - 2, /* unalign_store_cost */ > > - 2 /* store_cost */ > > + 4, /* align_load_cost */ > > + 4, /* unalign_load_cost */ > > + 1, /* unalign_store_cost */ > > + 1 /* store_cost */ > > }; > > > > /* Ampere-1 costs for vector insn classes. */ > > static const struct cpu_vector_cost ampere1_vector_cost = > > { > > 1, /* scalar_int_stmt_cost */ > > - 1, /* scalar_fp_stmt_cost */ > > + 3, /* scalar_fp_stmt_cost */ > > 4, /* scalar_load_cost */ > > 1, /* scalar_store_cost */ > > 1, /* cond_taken_branch_cost */ > > -- > > 2.34.1 >