This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] unreviewed patch (Bootstrap failure on ia64)
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Matt Kraai <kraai at alumni dot cmu dot edu>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Zack Weinberg <zack at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 May 2003 09:36:19 -0600 (MDT)
- Subject: Re: [PATCH] unreviewed patch (Bootstrap failure on ia64)
Hi Matt,
> I don't think his patch is correct. simplify_gen_binary aborts
> because the mode is VOIDmode. I'm testing the following patch on
> powerpc-unknown-linux-gnu, which fixes a number of the test suite
> failures.
>
> * builtins.c (expand_builtin_memcpy): Use mode of
> dest_addr for intermediate computation.
If a target's pointer type is 64-bits wide and len_rtx is only 32-bit,
wouldn't it make more sense to decrement the 32-bit value the promote,
instead of promoting both len_rtx and const1_rtx to ptr_mode to perform
the subtraction?
Personally, if people are unhappy with calculating the "delta" for
constant integers in expand_builtin_memcpy, I'd recommend Jakub's
suggestion:
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);
i.e. only resort to Pmode when we known both arguments are constants
so the expression will be evaluated at compile time.
Roger
--