From patchwork Tue Jan 2 09:37:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 854475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-469940-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NdIHwmGS"; 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 3z9prj6xqvz9s81 for ; Tue, 2 Jan 2018 20:37:57 +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=EKEDqV6wOQRZdu3sARlwZ969dSQuI2kRsIimYxS9YmlsxAW361VgV wtQzTq5p88fTTz3frmk1vkesVQb3Rga0hMkkJSqqj9JdrJ+7VnGoK59s25E6Y0fs BZ7QEzyZZ144awS76y7pimXapxquf7olVP/LU3uvcAbCpuVPAkQhHA= 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=aLW2yvuukHE65k0zhWyz3sOoEbI=; b=NdIHwmGSYrRb/n5hAWFn 7guhwp9cKMYIKl5yLE9OIgmqMYSMQnRw0cZqnJ0k28bgLBkMYHvyvp4n2u8SW2UB ZZZOWMZm0Mpcil/Ran26b2VIz3hLfXGd3AfG9Ung48PE4JpnBc2D3HiGg0x2uU5H z0SE5YJnKXlC11fnSh41Ao0= Received: (qmail 77087 invoked by alias); 2 Jan 2018 09:37:50 -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 76632 invoked by uid 89); 2 Jan 2018 09:37:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=22598 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jan 2018 09:37:48 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 5E9E954915B; Tue, 2 Jan 2018 10:37:46 +0100 (CET) Date: Tue, 2 Jan 2018 10:37:46 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix cost of integer loads for generic model Message-ID: <20180102093746.GB44218@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hi, this patch fixes register allocation issue in spec2006 lbm benchmark improving it by about 13%. Bootstrapped/regtested x86_64-linux, will commit it soon. Honza * x86-tune-costs.h (generic_cost): Increase cost of integer load to match other memory operations. diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h index eff7f7f6bbf..4f1795ad8d3 100644 --- a/gcc/config/i386/x86-tune-costs.h +++ b/gcc/config/i386/x86-tune-costs.h @@ -2259,8 +2260,8 @@ struct processor_costs generic_cost = { /* All move costs are relative to integer->integer move times 2 and thus they are latency*2. */ - 4, /* cost for loading QImode using movzbl */ - {4, 4, 4}, /* cost of loading integer registers + 6, /* cost for loading QImode using movzbl */ + {6, 6, 6}, /* cost of loading integer registers in QImode, HImode and SImode. Relative to reg-reg move (2). */ {6, 6, 6}, /* cost of storing integer registers */