From patchwork Fri Jun 23 17:59:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 780226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3wvR700HSPz9sxR for ; Sat, 24 Jun 2017 03:59:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dxzmZLDj"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=mcC/4XkHeN3xi6fYG1JMzHXJGUcmXoO+p1NI0C+k0ES41D n199GorehNs0R4ls8HAm6CAv4v0J8LDfrlbm2xv4xUsSfIvI9iMsTh8itDIfuR90 +vz/gD2khzscsP/vRODmycfdNT1A3A86UH4fxDCOX0ertMSCgdW5d9HlarA2c= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=0YeIOxSJ5jEJcb/C2ednW2v535E=; b=dxzmZLDjUoCidohcOnIN sV7Z/RbKbte5Rog8StdWTksx8KHuh7c1Nwgo/j2d5l3QHFfBB1/Dsd/Ato3tlUB1 vEk/VZPLXAiP9vwFADxDnwGRVarRjXAy6xM0h7A5+sbrsC2YN5cviY/R//rpsDgl Bs+PFrTXcYDyCZvVJWtsSAo= Received: (qmail 22612 invoked by alias); 23 Jun 2017 17:59:45 -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 22592 invoked by uid 89); 23 Jun 2017 17:59:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=bfx X-HELO: mail-yw0-f179.google.com Received: from mail-yw0-f179.google.com (HELO mail-yw0-f179.google.com) (209.85.161.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 17:59:43 +0000 Received: by mail-yw0-f179.google.com with SMTP id v7so19779019ywc.2 for ; Fri, 23 Jun 2017 10:59:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xGT2xWr9iWympb8kPLJmGDDSyqElY4hiLb5KQ1ltOb4=; b=lR952XFqZug7GOAZraWQGnfaO/IJrlKxvMcg9ShWlb000/x0zxxTkA1khj/Q+uFQY7 YZr1uDtETTdcmgORU9veWzkMi97C+o75OsED+0/bIMLA33S9sK+WlqQ8CAO1MAobfYF/ GnXBIdXfwR0MGwIOtxUO5Ys1c79SdkK3iI1sfnhXu/yI67z0yD2y3ib2VH4+kzGoIl0f UXvK9rzRZzogEOSUq5t5Zuyi1YLkiMy0i2hcQNhhDNrc8IFhdNBZpTAOiQqCdTReXOFI ZQw/d2yryMKhVomhCMuugEfzQeZd2TQQVjXhP8G54btMT/ISB5Kufpw4A5UOJiV87wBI xbMg== X-Gm-Message-State: AKS2vOxHdU0jHneUvqkQakHCiWLEqV6gMi3BTdYZydXyjO71Q5YBaMR+ v5oHrDPviOYs979aEkeUtlPsOH8ULohN X-Received: by 10.129.72.75 with SMTP id v72mr7025701ywa.160.1498240781522; Fri, 23 Jun 2017 10:59:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.47.200 with HTTP; Fri, 23 Jun 2017 10:59:41 -0700 (PDT) From: Andrew Pinski Date: Fri, 23 Jun 2017 10:59:41 -0700 Message-ID: Subject: [PATCH/AARCH64] Improve cost of arithmetic instructions with shift/extend on ThunderX2T99 To: GCC Patches X-IsSubscribed: yes Hi, This patch is similar to what I did for ThunderX where I increase the costs of these instructions slightly to point out there is a slight cost to using them over using the two instructions. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. This gave ~2% on SPEC CPU 2006 int. Thanks, Andrew Pinski ChangeLog: * config/aarch64/aarch64-cost-tables.h (thunderx2t99_extra_costs): Increment Arith_shift, Arith_shift_reg, Log_shift, Log_shift_reg and Extend_arith by 1. Index: gcc/config/aarch64/aarch64-cost-tables.h =================================================================== --- gcc/config/aarch64/aarch64-cost-tables.h (revision 249583) +++ gcc/config/aarch64/aarch64-cost-tables.h (working copy) @@ -239,12 +239,12 @@ 0, /* Logical. */ 0, /* Shift. */ 0, /* Shift_reg. */ - COSTS_N_INSNS (1), /* Arith_shift. */ - COSTS_N_INSNS (1), /* Arith_shift_reg. */ - COSTS_N_INSNS (1), /* Log_shift. */ - COSTS_N_INSNS (1), /* Log_shift_reg. */ + COSTS_N_INSNS (1)+1, /* Arith_shift. */ + COSTS_N_INSNS (1)+1, /* Arith_shift_reg. */ + COSTS_N_INSNS (1)+1, /* Log_shift. */ + COSTS_N_INSNS (1)+1, /* Log_shift_reg. */ 0, /* Extend. */ - COSTS_N_INSNS (1), /* Extend_arith. */ + COSTS_N_INSNS (1)+1, /* Extend_arith. */ 0, /* Bfi. */ 0, /* Bfx. */ COSTS_N_INSNS (3), /* Clz. */