This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

trivial valudate_replace_rtx fix


Hi,
seeing Alan's patch, it reminded me following fix sitting in my tree
for a while.  While revamping the code, I've forgot to kill one test,
so I am about to install this as obvious.

It avoids the same problem as Alan's patch, but in different way-
the CONST is stripped by plus_constant.

Honza

Tue Jun 12 16:52:41 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* recog.c (validate_replace_rtx_1): Do plus_constant call always.

Index: recog.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/recog.c,v
retrieving revision 1.106
diff -c -3 -p -r1.106 recog.c
*** recog.c	2001/06/08 12:19:12	1.106
--- recog.c	2001/06/12 14:49:51
*************** validate_replace_rtx_1 (loc, from, to, o
*** 510,516 ****
           plus_constant to try to simplify it.
           ??? We may want later to remove this, once simplification is
           separated from this function.  */
!       if (GET_CODE (XEXP (x, 1)) == CONST_INT && XEXP (x, 1) == to)
  	validate_change (object, loc,
  			 plus_constant (XEXP (x, 0), INTVAL (to)), 1);
        break;
--- 510,516 ----
           plus_constant to try to simplify it.
           ??? We may want later to remove this, once simplification is
           separated from this function.  */
!       if (GET_CODE (XEXP (x, 1)) == CONST_INT)
  	validate_change (object, loc,
  			 plus_constant (XEXP (x, 0), INTVAL (to)), 1);
        break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]