public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix an error in a change from 2009
@ 2014-05-19 11:40 Bernd Schmidt
  0 siblings, 0 replies; only message in thread
From: Bernd Schmidt @ 2014-05-19 11:40 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

There was a patch to change GET_CODE(..) == CONST_INT to CONST_INT_P, 
and in one instance this was done incorrectly, leaving only a plain 
GET_CODE without any comparison.  I've committed the following as 
obvious after testing on x86_64-linux.


Bernd

[-- Attachment #2: srtx-shift.diff --]
[-- Type: text/x-patch, Size: 680 bytes --]


	* simplify-rtx.c (simplify_unary_operation_1): Use CONST_INT_P in
	shift simplification where it was intended.

diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 04af01e..bdbcc6b 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -867,7 +867,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
 	 so we can perform the above simplification.  */
       if (STORE_FLAG_VALUE == -1
 	  && GET_CODE (op) == ASHIFTRT
-	  && GET_CODE (XEXP (op, 1))
+	  && CONST_INT_P (XEXP (op, 1))
 	  && INTVAL (XEXP (op, 1)) == GET_MODE_PRECISION (mode) - 1)
 	return simplify_gen_relational (GE, mode, VOIDmode,
 					XEXP (op, 0), const0_rtx);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-19 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-19 11:40 Fix an error in a change from 2009 Bernd Schmidt

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).