From: Dmitry Plotnikov <dplotnikov@ispras.ru>
To: Andrew Stubbs <ams@codesourcery.com>
Cc: Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>,
gcc-patches@gcc.gnu.org, patches@linaro.org, dm@ispras.ru
Subject: Re: [PATCH][ARM] Add support for ADDW and SUBW instructions
Date: Mon, 06 Jun 2011 13:26:00 -0000 [thread overview]
Message-ID: <4DECD592.2070708@ispras.ru> (raw)
In-Reply-To: <4DECCAF8.5030406@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On 06/06/2011 04:41 PM, Andrew Stubbs wrote:
> On 06/06/11 13:15, Dmitry Plotnikov wrote:
>> + && (const_ok_for_op (INTVAL (x), outer)
>> + || const_ok_for_op (~INTVAL (x), outer))))
>
> The second call is redundant. const_ok_for_op should already do that.
>
Fixed patch is attached. Ok?
[-- Attachment #2: costplus.patch --]
[-- Type: text/x-patch, Size: 715 bytes --]
2011-06-06 Dmitry PLotnikov <dplotnikov@ispras.ru>
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,9 @@ 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))))
*total = COSTS_N_INSNS (1);
else
*total = COSTS_N_INSNS (arm_gen_constant (SET, mode, NULL_RTX,
next prev parent reply other threads:[~2011-06-06 13:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 15:36 Andrew Stubbs
2011-04-20 15:56 ` Andrew Stubbs
2011-05-18 15:47 ` Andrew Stubbs
2011-06-02 8:07 ` Andrew Stubbs
2011-06-02 8:24 ` Ramana Radhakrishnan
2011-06-02 9:03 ` Andrew Stubbs
2011-06-02 10:37 ` Ramana Radhakrishnan
2011-06-16 9:41 ` Stubbs, Andrew
2011-08-26 12:04 ` Andrew Stubbs
2011-06-06 12:15 ` Dmitry Plotnikov
2011-06-06 12:41 ` Andrew Stubbs
2011-06-06 13:26 ` Dmitry Plotnikov [this message]
2011-06-06 13:33 ` Andrew Stubbs
2011-06-06 14:26 ` Dmitry Plotnikov
2011-06-06 14:31 ` Andrew Stubbs
2011-06-15 13:12 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DECD592.2070708@ispras.ru \
--to=dplotnikov@ispras.ru \
--cc=ams@codesourcery.com \
--cc=dm@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--cc=patches@linaro.org \
--cc=ramana.radhakrishnan@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).