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]

reload patch for x86 splitting problem



This should fix the relatively common problem with the x86 port being
unable to split some instructions (conditional moves seem to trigger this
bug a lot).

	* reload.c (push_reload): Do not call remove_address_replacements
	when presented with identical optional reloads.

Index: reload.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload.c,v
retrieving revision 1.71
diff -c -3 -p -r1.71 reload.c
*** reload.c	1999/03/22 13:11:26	1.71
--- reload.c	1999/05/27 08:13:14
*************** push_reload (in, out, inloc, outloc, cla
*** 1360,1367 ****
  	     are identical in content, there might be duplicate address
  	     reloads.  Remove the extra set now, so that if we later find
  	     that we can inherit this reload, we can get rid of the
! 	     address reloads altogether.  */
! 	  if (reload_in[i] != in && rtx_equal_p (in, reload_in[i]))
  	    {
  	      /* We must keep the address reload with the lower operand
  		 number alive.  */
--- 1360,1377 ----
  	     are identical in content, there might be duplicate address
  	     reloads.  Remove the extra set now, so that if we later find
  	     that we can inherit this reload, we can get rid of the
! 	     address reloads altogether.
! 
! 	     Do not do this if both reloads are optional since the result
! 	     would be an optional reload which could potentially leave
! 	     unresolved address replacements.
! 
! 	     It is not sufficient to call transfer_replacements since
! 	     choose_reload_regs will remove the replacements for address
! 	     reloads of inherited reloads which results in the same
! 	     problem.  */
! 	  if (reload_in[i] != in && rtx_equal_p (in, reload_in[i])
! 	      && ! (reload_optional[i] && optional))
  	    {
  	      /* We must keep the address reload with the lower operand
  		 number alive.  */



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