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: Unreviewed patches


Geoff Keating wrote:
> 
> Joern Rennecke <joern.rennecke@superh.com> writes:
> 
> > Thu Jul 11 11:39:11 2002  J"orn Rennecke <joern.rennecke@superh.com>
> >
> >       * simplify-rtx.x (simplify_subreg): When constructing a CONST_VECTOR
> >       from individual subregs, check that each subreg has been generated
> >       sucessfully.
> >
> > http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00667.html
> 
> This is OK.
> >
> > Mon Jul 15 12:32:59 2002  J"orn Rennecke <joern.rennecke@superh.com>
> >
> > gcc:
> >       * reload.c (find_reloads_toplev): Use simplify_gen_subreg.
> >       * simplify-rtx.c (simplify_subreg): When converting to a non-int
> >       mode, try to convert to an integer mode of matching size first.
> >
> > gcc/testsuite:
> >       * gcc.c-torture/compile/simd-4.c: New test.
> >
> > http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00662.html
> 
> That's clever, let's try it.  OK to commit.

Thanks, commmitted.

> > Mon Jul 15 12:32:59 2002  J"orn Rennecke <joern.rennecke@superh.com>
> >
> >       * recog.c (asm_operand_ok): Allow float CONST_VECTORs for 'F'.
> >       (constrain_operands): Likewise.
> >       * regclass.c (record_reg_classes): Likewise.
> >       * reload.c (find_reloads): Likewise.
> >
> > http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00664.html
> 
> I'm a bit worried that this might change the semantics of an existing port.
> Are there any current ports that use 'F' and allow any mode?

This would only be relevant if an instruction that has a CONST_VECTOR
source is recognized first, i.e. allowed by the predicates.  All my
change is likely to do in such an circumstance is to change a reload
failure into recognizing an alternative that might not be what the author
intended (but then, it might be).
Well, unless you have an instruction where the 'F' alternative is
supposed to match only for non-vector modes, and some other alternatives
are used for vector modes.  I suppose such a construct would come into
the category 'you deserve whatever you get'.
	
> Also, it needs a documentation change.

I've added two words to md.texi in the appended patch.
	
-- 
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330
Tue Jul 23 21:13:27 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* recog.c (asm_operand_ok): Allow float CONST_VECTORs for 'F'.
	(constrain_operands): Likewise.
	* regclass.c (record_reg_classes): Likewise.
	* reload.c (find_reloads): Likewise.
	* doc/md.texi: Likewise.

Index: recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.160
diff -p -r1.160 recog.c
*** recog.c	28 Jun 2002 15:43:53 -0000	1.160
--- recog.c	12 Jul 2002 02:57:14 -0000
*************** asm_operand_ok (op, constraint)
*** 1730,1736 ****
  
  	case 'E':
  	case 'F':
! 	  if (GET_CODE (op) == CONST_DOUBLE)
  	    return 1;
  	  break;
  
--- 1730,1738 ----
  
  	case 'E':
  	case 'F':
! 	  if (GET_CODE (op) == CONST_DOUBLE
! 	      || (GET_CODE (op) == CONST_VECTOR
! 		  && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT))
  	    return 1;
  	  break;
  
*************** constrain_operands (strict)
*** 2498,2504 ****
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (op) == CONST_DOUBLE)
  		  win = 1;
  		break;
  
--- 2500,2508 ----
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (op) == CONST_DOUBLE
! 		    || (GET_CODE (op) == CONST_VECTOR
! 			&& GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT))
  		  win = 1;
  		break;
  
Index: regclass.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
retrieving revision 1.152
diff -p -r1.152 regclass.c
*** regclass.c	16 Jun 2002 21:52:39 -0000	1.152
--- regclass.c	12 Jul 2002 02:57:15 -0000
*************** record_reg_classes (n_alts, n_ops, ops, 
*** 1635,1641 ****
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (op) == CONST_DOUBLE)
  		  win = 1;
  		break;
  
--- 1635,1644 ----
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (op) == CONST_DOUBLE
! 		    || (GET_CODE (op) == CONST_VECTOR
! 			&& (GET_MODE_CLASS (GET_MODE (op))
! 			    == MODE_VECTOR_FLOAT)))
  		  win = 1;
  		break;
  
Index: reload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.185
diff -p -r1.185 reload.c
*** reload.c	14 Jun 2002 01:41:53 -0000	1.185
--- reload.c	12 Jul 2002 02:57:15 -0000
*************** find_reloads (insn, replace, ind_levels,
*** 3142,3148 ****
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (operand) == CONST_DOUBLE)
  		  win = 1;
  		break;
  
--- 3142,3151 ----
  
  	      case 'E':
  	      case 'F':
! 		if (GET_CODE (operand) == CONST_DOUBLE
! 		    || (GET_CODE (operand) == CONST_VECTOR
! 			&& (GET_MODE_CLASS (GET_MODE (operand))
! 			    == MODE_VECTOR_FLOAT)))
  		  win = 1;
  		break;
  
Index: doc/md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.44
diff -p -r1.44 md.texi
*** doc/md.texi	30 Jun 2002 19:27:48 -0000	1.44
--- doc/md.texi	23 Jul 2002 20:12:40 -0000
*************** that of the host machine (on which the c
*** 845,852 ****
  
  @cindex @samp{F} in constraint
  @item @samp{F}
! An immediate floating operand (expression code @code{const_double}) is
! allowed.
  
  @cindex @samp{G} in constraint
  @cindex @samp{H} in constraint
--- 845,852 ----
  
  @cindex @samp{F} in constraint
  @item @samp{F}
! An immediate floating operand (expression code @code{const_double} or
! @code{const_vector}) is allowed.
  
  @cindex @samp{G} in constraint
  @cindex @samp{H} in constraint

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