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: Patch: validate_replace_rtx_1 fix


> Hi,
> 
> Jan Hubicka wrote:
> 
> > > simplify_unary_operation is called with (code=NEG, mode=VOIDmode,
> > VOIDmode is wrong, it should be SImode.  Who is calling it?
> > Can you add an sanity check to that function?
> 
> See subject: validate_replace_rtx_1 :)
> It's the 'case MINUS:' part, op0_mode is VOIDmode.
See it :)
I guess proper fix is following.  We don't need to mess with op0_mode
at all and simply use the mode of the expression, as MINUS requires these
to match.  If it solves the problem I will bootstrap/regtest i686 it
and install as obvious.

Sat Jul 28 22:57:14 CEST 2001  Roman Zippel  <zippel@linux-m68k.org>
			       Jan Hubicka  <jh@suse.cz>
Index: recog.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/recog.c,v
retrieving revision 1.116
diff -c -3 -p -r1.116 recog.c
*** recog.c	2001/07/24 18:34:05	1.116
--- recog.c	2001/07/28 20:56:40
*************** validate_replace_rtx_1 (loc, from, to, o
*** 521,528 ****
  			 simplify_gen_binary
  			 (PLUS, GET_MODE (x), XEXP (x, 0),
  			  simplify_gen_unary (NEG,
! 					      op0_mode, XEXP (x, 1),
! 					      op0_mode)), 1);
        break;
      case ZERO_EXTEND:
      case SIGN_EXTEND:
--- 521,528 ----
  			 simplify_gen_binary
  			 (PLUS, GET_MODE (x), XEXP (x, 0),
  			  simplify_gen_unary (NEG,
! 					      GET_MODE (x), XEXP (x, 1),
! 					      GET_MODE (x))), 1);
        break;
      case ZERO_EXTEND:
      case SIGN_EXTEND:


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