This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits
- From: Jeff Law <law at redhat dot com>
- To: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>, "'Andrew Pinski'" <pinskia at gmail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Feb 2015 23:03:57 -0700
- Subject: Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits
- Authentication-results: sourceware.org; auth=none
- References: <00f001d044d4$23f37e20$6bda7a60$ at arm dot com> <CA+=Sn1n0FZSdn4RqVHGmuoeA5+gb3MVxZheC0pFELWkRDO-mew at mail dot gmail dot com> <00f201d044d8$0131ccd0$03956670$ at arm dot com>
On 02/09/15 19:19, Thomas Preud'homme wrote:
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.
From: Andrew Pinski [mailto:firstname.lastname@example.org]
Sent: Tuesday, February 10, 2015 9:57 AM
+/* If MODE has a precision lower than PREC and SRC is a non-negative
+ that would appear negative in MODE, sign-extend SRC for use in
+ because some machines (maybe most) will actually do the sign-
+ this is the conservative approach.
+ ??? For 2.5, try to tighten up the MD files in this regard instead of
+ 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
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.
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.