[PATCH] Bootstrap failure on ia64 (take 2)

Roger Sayle roger@eyesopen.com
Wed May 21 12:42:00 GMT 2003


The following patch implements Jakub's suggestion of tweaking the
mode rather than handling CONST_INT specially in my earlier patch:
http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01674.html

The following patch has been tested on i686-pc-linux-gnu with a
full bootstrap, all languages except treelang (including ada), and
regression checked with a top-level "make -k check" with no new
failures.

Once again, I believe this patch should fix both the current ia64
bootstrap failures and the powerpc testsuite regressions.

Ok for mainline?

Very many thanks in advance for a speedy review.


2003-05-21  Roger Sayle  <roger@eyesopen.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* builtins.c (expand_builtin_memcpy):  Be careful to avoid
	calling simplify_gen_binary with constant arguments.


Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.202
diff -c -3 -p -r1.202 builtins.c
*** builtins.c	18 May 2003 22:50:25 -0000	1.202
--- builtins.c	21 May 2003 02:43:41 -0000
*************** expand_builtin_memcpy (arglist, target,
*** 2311,2324 ****
  #endif
  	  if (endp)
  	    {
! 	      rtx result;
! 	      rtx delta = len_rtx;

  	      if (endp == 2)
! 		delta = GEN_INT (INTVAL (delta) - 1);

  	      result = simplify_gen_binary (PLUS, GET_MODE (dest_mem),
! 					    dest_mem, delta);
  	      return force_operand (result, NULL_RTX);
  	    }
  	  else
--- 2311,2323 ----
  #endif
  	  if (endp)
  	    {
! 	      rtx result = len_rtx;

  	      if (endp == 2)
! 		result = GEN_INT (INTVAL (result) - 1);

  	      result = simplify_gen_binary (PLUS, GET_MODE (dest_mem),
! 					    dest_mem, result);
  	      return force_operand (result, NULL_RTX);
  	    }
  	  else
*************** expand_builtin_memcpy (arglist, target,
*** 2347,2354 ****

  	  if (endp == 2)
  	    {
! 	      result = simplify_gen_binary (MINUS, GET_MODE (result),
! 					    result, const1_rtx);
  	      result = force_operand (result, NULL_RTX);
  	    }

--- 2346,2355 ----

  	  if (endp == 2)
  	    {
! 	      enum machine_mode mode = GET_MODE (result);
! 	      if (mode == VOIDmode)
! 		mode = Pmode;
! 	      result = simplify_gen_binary (MINUS, mode, result, const1_rtx);
  	      result = force_operand (result, NULL_RTX);
  	    }


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833



More information about the Gcc-patches mailing list