public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Roger Sayle <roger@www.eyesopen.com>
To: David Edelsohn <dje@watson.ibm.com>
Cc: Andreas Schwab <schwab@suse.de>,
	Zack Weinberg <zack@codesourcery.com>, <gcc@gcc.gnu.org>,
	<gcc-patches@gcc.gnu.org>
Subject: Re: Bootstrap failure on ia64
Date: Mon, 19 May 2003 16:49:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0305191005460.18003-100000@www.eyesopen.com> (raw)
In-Reply-To: <200305191425.KAA26564@makai.watson.ibm.com>


Hi David,
> 	FYI, I receive the same error on PowerPC in the testsuite,
> although the compiler does bootstrap.  If not for the G++ bootstrap
> failure, you would have received this feedback much earlier.

Many thanks.  I now understand the cause of the failure and am
currently attempting to bootstrap and regression test the following
patch.

The issue is that in the second hunk, len_rtx is a constant integer
that wasn't handled by the first hunk.  We'd then end up calling
simplify_gen_binary(MINUS, VOIDmode, const_int, const_int) which
isn't able to do the constant folding itself.  I'll look into a
follow-up patch to see if simplify_gen_binary can be improved to
handle this case.  For the time being, the following patch should
fix the powerpc regressions, and probably also the ia64 bootstrap
failure.

Ok to commit to mainline if bootstrapping and regression testing
complete?  Once again my sincere apologies.



2003-05-19  Roger Sayle  <roger@eyesopen.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	19 May 2003 16:22:01 -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,2355 ****

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

  	  result = simplify_gen_binary (PLUS, GET_MODE (dest_addr),
--- 2346,2359 ----

  	  if (endp == 2)
  	    {
! 	      if (GET_CODE (result) != CONST_INT)
! 		{
! 		  result = simplify_gen_binary (MINUS, GET_MODE (result),
! 						result, const1_rtx);
! 		  result = force_operand (result, NULL_RTX);
! 		}
! 	      else
! 		result = GEN_INT (INTVAL (result) - 1);
  	    }

  	  result = simplify_gen_binary (PLUS, GET_MODE (dest_addr),


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

  reply	other threads:[~2003-05-19 16:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19 12:58 Andreas Schwab
2003-05-19 13:57 ` Roger Sayle
2003-05-19 14:31   ` David Edelsohn
2003-05-19 16:49     ` Roger Sayle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-06-29 18:58 bootstrap " Richard Guenther
2004-06-29 18:59 ` Diego Novillo
2004-06-29 19:22   ` Andrew Pinski
2004-06-29 20:33     ` Richard Guenther
2004-06-29 22:34       ` Diego Novillo
2004-06-10 20:29 Richard Guenther
2004-06-10 21:33 ` Eric Botcazou
2004-06-24 20:11 ` Jim Wilson
2003-06-27 13:10 Bootstrap " Andreas Schwab
2003-03-29 17:49 Andreas Schwab
2002-04-10  7:11 Warning: gcc (3.1 branch) is broken for target i686-pc-mingw32 megacz
2002-04-10  9:31 ` Bootstrap failure on ia64 Andreas Schwab
2002-04-10  9:49   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0305191005460.18003-100000@www.eyesopen.com \
    --to=roger@www.eyesopen.com \
    --cc=dje@watson.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=schwab@suse.de \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).