From: Jeff Law <law@redhat.com>
To: "Thomas Preud'homme" <thomas.preudhomme@arm.com>,
"'Andrew Pinski'" <pinskia@gmail.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits
Date: Wed, 11 Feb 2015 06:04:00 -0000 [thread overview]
Message-ID: <54DAF0CD.9030701@redhat.com> (raw)
In-Reply-To: <00f201d044d8$0131ccd0$03956670$@arm.com>
On 02/09/15 19:19, Thomas Preud'homme wrote:
>> From: Andrew Pinski [mailto:pinskia@gmail.com]
>> Sent: Tuesday, February 10, 2015 9:57 AM
>
>>> +#ifdef SHORT_IMMEDIATES_SIGN_EXTEND
>>> +/* If MODE has a precision lower than PREC and SRC is a non-negative
>> constant
>>> + that would appear negative in MODE, sign-extend SRC for use in
>> nonzero_bits
>>> + because some machines (maybe most) will actually do the sign-
>> extension and
>>> + this is the conservative approach.
>>> +
>>> + ??? For 2.5, try to tighten up the MD files in this regard instead of
>> this
>>> + kludge. */
>>
>> I don't know if this has been mentioned and even though you are just
>> copying a comment from below but would it make sense to look fixing
>> what the comment says we should look at after GCC 2.5 (which was over
>> 20 years ago)? Or maybe just remove the comment if it no longer
>> applies.
>
> Actually this bit seems unnecessary as there is already some logic in
> nonzero_bits1 for the CONST_INT case. So I guess the code can be
> removed and the comment be moved there at the very least but
> I'd prefer people from one of the affected target to test it.
>
> Looking for backend that define SHORT_IMMEDIATES_SIGN_EXTEND, that
> would be someone interested in alpha, frv, lm32, m32r, mep, mips, rs6000,
> rx, sh, tilegx or tilepro.
FWIW, I went back into the old gcc development archives for 1993 and
couldn't find any reference/justification for this patch. So no help in
understanding the precise issue from the old archives.
Given the rs6000 is affected, one could do before/after tests natively
in the gcc farm to ensure that removing that code doesn't change the
generated code across a bootstrap.
That's probably how I'd approach gathering some data about whether or
not the comment/code is still appropriate/needed.
jeff
next prev parent reply other threads:[~2015-02-11 6:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 1:52 Thomas Preud'homme
2015-02-10 1:57 ` Andrew Pinski
2015-02-10 2:19 ` Thomas Preud'homme
2015-02-11 6:04 ` Jeff Law [this message]
2015-02-11 6:43 ` Thomas Preud'homme
2015-02-11 6:48 ` Jeff Law
2015-02-11 6:56 ` Thomas Preud'homme
2015-04-24 10:43 ` Thomas Preud'homme
2015-02-12 8:35 ` Alan Modra
2015-02-13 9:40 ` Thomas Preud'homme
2015-04-24 18:57 ` Jeff Law
2015-04-27 11:03 ` Thomas Preud'homme
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=54DAF0CD.9030701@redhat.com \
--to=law@redhat.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
--cc=thomas.preudhomme@arm.com \
/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).