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]

Re: GCC build failed for 2 targets with your patch on 2001-05-17T15:11:55Z.


Hi,
the PPC problem is caused by regmove optimization, that changes mode of the
register from smaller to the wider by first replacing mode and then validating
change from the register to subreg expression.  The subreg simplifier gets
confused, as the subreg appears to have different mode for him then, so the
checking code aborts.

I am testing following fix and if the testing passes, I will install it as
obvious.

Thu May 17 19:08:11 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* recog.c (validate_replace_rtx_1): Use "TO" mode if not VOIDmode
	when calling simplify_subreg.  This is needed to allow replacing
	of expression of one mode by expression of different mode.

Index: recog.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/recog.c,v
retrieving revision 1.101
diff -c -3 -p -r1.101 recog.c
*** recog.c	2001/05/17 15:00:35	1.101
--- recog.c	2001/05/17 17:07:39
*************** validate_replace_rtx_1 (loc, from, to, o
*** 582,588 ****
        if (rtx_equal_p (SUBREG_REG (x), from))
          {
  	  rtx temp;
! 	  temp = simplify_subreg (GET_MODE (x), to, GET_MODE (SUBREG_REG (x)),
  				  SUBREG_BYTE (x));
  	  if (temp)
  	    {
--- 583,591 ----
        if (rtx_equal_p (SUBREG_REG (x), from))
          {
  	  rtx temp;
! 	  temp = simplify_subreg (GET_MODE (x), to,
! 			 	  GET_MODE (to) != VOIDmode
! 				  ? GET_MODE (to) : GET_MODE (SUBREG_REG (x)),
  				  SUBREG_BYTE (x));
  	  if (temp)
  	    {


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