From patchwork Wed Nov 23 19:00:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 83743 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2880173obn; Wed, 23 Nov 2016 11:00:51 -0800 (PST) X-Received: by 10.98.80.140 with SMTP id g12mr4230494pfj.54.1479927651067; Wed, 23 Nov 2016 11:00:51 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id y4si35125869pgc.54.2016.11.23.11.00.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 11:00:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-442434-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-442434-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-442434-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=j6Wy20gAUMgdEVgXS 9zvRk48MlYa4iJpqPh78RVGxBgcOjSNPEPSjdt697YCEzGgIiveCGI7Y08i4vW/x nJ0oIvoll1B5FQ7tCpMS4oE0KIjOzJgK16rjHkGLK2NZS5pD4jVIsuE1iBcv/k6s QXvNezI06ppvIKJCIcnwvEJRDM= 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=eYdZCrkIKXMvuqD0SaAJVGV HY6E=; b=UVsSF02JpEQforQRarURkfIobFkX0ydtQ/r7LG/+Z3ds+Phaven+mF9 gGpUOH/IkDGF9Y2gxJNaY+TQ7EAy+knbUNXu23M7l2IXrRaWXfloqzx4CrrPv5Av 8UKOFrHhpwfOBy+O1NaxNVbIFbCzKSPYIB7MgMX2RquZL56eP3pA= Received: (qmail 118870 invoked by alias); 23 Nov 2016 19:00:37 -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 118815 invoked by uid 89); 23 Nov 2016 19:00:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=misspelled X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 19:00:33 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04C54C04B92D for ; Wed, 23 Nov 2016 19:00:32 +0000 (UTC) Received: from localhost.localdomain (vpn1-5-172.ams2.redhat.com [10.36.5.172]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uANJ0VlG021462 for ; Wed, 23 Nov 2016 14:00:31 -0500 Subject: Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386. To: GCC Patches References: From: Bernd Schmidt Message-ID: <2bde94e0-b470-8aad-6a9c-91e45dc8b687@redhat.com> Date: Wed, 23 Nov 2016 20:00:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-IsSubscribed: yes Note that I misspelled the PR number in the 0/3 message :-/ On 11/23/2016 07:57 PM, Bernd Schmidt wrote: > 1. I noticed comparisons between set_src_cost and set_rtx_cost seemed to > be invalid. There seems to be no good reason that insn_rtx_cost > shouldn't use the latter. It also makes the numbers comparable to the > ones you get from seq_cost. Bernd PR rtl-optimization/78120 * rtlanal.c (insn_rtx_cost): Use set_rtx_cost. Index: gcc/rtlanal.c =================================================================== --- gcc/rtlanal.c (revision 242038) +++ gcc/rtlanal.c (working copy) @@ -5211,7 +5211,7 @@ insn_rtx_cost (rtx pat, bool speed) else return 0; - cost = set_src_cost (SET_SRC (set), GET_MODE (SET_DEST (set)), speed); + cost = set_rtx_cost (set, speed); return cost > 0 ? cost : COSTS_N_INSNS (1); }