From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87287 invoked by alias); 18 Mar 2015 09:06:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 87274 invoked by uid 89); 18 Mar 2015 09:06:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Mar 2015 09:06:48 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Wed, 18 Mar 2015 09:06:46 +0000 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 18 Mar 2015 09:06:44 +0000 Message-ID: <55094024.8040201@arm.com> Date: Wed, 18 Mar 2015 09:06:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Jeff Law , GCC Patches Subject: Re: [PATCH][expmed] Calculate mult-by-const cost properly in mult_by_coeff_cost References: <5506ACA9.4000909@arm.com> <55087C70.6070605@redhat.com> In-Reply-To: <55087C70.6070605@redhat.com> X-MC-Unique: 115031809064600301 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00899.txt.bz2 On 17/03/15 19:11, Jeff Law wrote: > On 03/16/2015 04:12 AM, Kyrill Tkachov wrote: >> Hi all, >> >> Eyeballing the mult_by_coeff_cost function I think it has a typo/bug. >> It's supposed to return the cost of multiplying by a constant 'coeff'. >> It calculates that by taking the cost of a MULT rtx by that constant >> and comparing it to the cost of synthesizing that multiplication, and >> returning >> the cheapest. However, in the MULT rtx cost calculations it creates >> a MULT rtx of two REGs rather than the a REG and the GEN_INT of coeff as >> I would >> expect. This patches fixes that in the obvious way. >> >> Tested aarch64-none-elf and bootstrapped on x86_64-linux-gnu. >> I'm guessing this is stage 1 material at this point? >> >> Thanks, >> Kyrill >> >> 2015-03-13 Kyrylo Tkachov >> >> * expmed.c (mult_by_coeff_cost): Pass CONT_INT rtx to MULT cost >> calculation rather than fake_reg. > I'd think stage1, unless you can point to a bug, particularly a regressio= n. No regression that I know of. I'll queue it up for stage 1 if it's ok=20 code-wise. Thanks, Kyrill > Jeff >