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]
Other format: [Raw text]

Re: [patch] more simplify_subreg SIMD bugs


> As discussed on irc, I think the proper solution is as follows.

Thank you.

Yes, this is OK for mainline and e500 branch.

I've committed the following.

:-)

2003-06-16  Richard Henderson  <rth@redhat.com>

	* simplify-rtx.c (simplify_subreg): Use GET_MODE_SIZE instead of
	GET_MODE_UNIT_SIZE when simplifying constant vectors.

Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.142
diff -c -p -r1.142 simplify-rtx.c
*** simplify-rtx.c	13 Jun 2003 19:27:27 -0000	1.142
--- simplify-rtx.c	16 Jun 2003 20:53:48 -0000
*************** simplify_subreg (outermode, op, innermod
*** 2721,2727 ****
  	      /* This might fail, e.g. if taking a subreg from a SYMBOL_REF.  */
  	      /* ??? It would be nice if we could actually make such subregs
  		 on targets that allow such relocations.  */
! 	      if (byte >= GET_MODE_UNIT_SIZE (innermode))
  		elt = CONST0_RTX (submode);
  	      else
  	        elt = simplify_subreg (submode, op, innermode, byte);
--- 2721,2727 ----
  	      /* This might fail, e.g. if taking a subreg from a SYMBOL_REF.  */
  	      /* ??? It would be nice if we could actually make such subregs
  		 on targets that allow such relocations.  */
! 	      if (byte >= GET_MODE_SIZE (innermode))
  		elt = CONST0_RTX (submode);
  	      else
  	        elt = simplify_subreg (submode, op, innermode, byte);


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