From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16722 invoked by alias); 6 Jun 2011 12:15:07 -0000 Received: (qmail 16640 invoked by uid 22791); 6 Jun 2011 12:15:02 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,FSL_RU_URL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.ispras.ru (HELO smtp.ispras.ru) (83.149.198.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 12:14:47 +0000 Received: from ispserv.ispras.ru (ispserv.ispras.ru [83.149.198.72]) by smtp.ispras.ru (Postfix) with ESMTP id 383565D4091; Mon, 6 Jun 2011 16:10:04 +0400 (MSD) Received: from [10.10.3.60] (winnie.ispras.ru [83.149.198.236]) by ispserv.ispras.ru (Postfix) with ESMTP id 21E0F3FC48; Mon, 6 Jun 2011 16:14:46 +0400 (MSD) Message-ID: <4DECC4CB.2000500@ispras.ru> Date: Mon, 06 Jun 2011 12:15:00 -0000 From: Dmitry Plotnikov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Andrew Stubbs CC: Ramana Radhakrishnan , gcc-patches@gcc.gnu.org, patches@linaro.org, dm@ispras.ru Subject: Re: [PATCH][ARM] Add support for ADDW and SUBW instructions References: <4DAEFB5C.8020802@codesourcery.com> <4DE751DF.8080906@codesourcery.com> In-Reply-To: <4DE751DF.8080906@codesourcery.com> Content-Type: multipart/mixed; boundary="------------020805050701010207080605" X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg00395.txt.bz2 This is a multi-part message in MIME format. --------------020805050701010207080605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 164 This is follow-up patch that fixes rtx costs for CONST_INT in PLUS pattern. Original discussion is here: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01427.html --------------020805050701010207080605 Content-Type: text/x-patch; name="costplus.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="costplus.patch" Content-length: 768 2011-06-06 Dmitry PLotnikov gcc/ * config/arm/arm.c (arm_rtx_costs_1): Fixed costs for CONST_INT in PLUS pattern. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 22ddcd2..9ef6f6d 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7050,7 +7056,10 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed) case CONST_INT: if (const_ok_for_arm (INTVAL (x)) - || const_ok_for_arm (~INTVAL (x))) + || const_ok_for_arm (~INTVAL (x)) + || (TARGET_THUMB2 && outer == PLUS + && (const_ok_for_op (INTVAL (x), outer) + || const_ok_for_op (~INTVAL (x), outer)))) *total = COSTS_N_INSNS (1); else *total = COSTS_N_INSNS (arm_gen_constant (SET, mode, NULL_RTX, --------------020805050701010207080605--