This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: reload move2add may drop mode truncation
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 10 May 2003 23:14:46 -0300
- Subject: Re: reload move2add may drop mode truncation
- Organization: GCC Team, Red Hat
- References: <ork7ds6839.fsf@free.redhat.lsd.ic.unicamp.br><ord6iublfs.fsf@free.redhat.lsd.ic.unicamp.br><u8addvw5nl.fsf@gromit.moeb>
On May 10, 2003, Andreas Jaeger <aj@suse.de> wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
>> On Apr 17, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:
>>
>>> * reload1.c (reload_cse_move2add): Don't turn an implicit
>>> truncation into a self-set in the narrow mode.
>>
>> Ping?
>> http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01389.html
> This patch is broken, now bootstrap on i686-linux-gnu fails with
> checking enabled:
Sorry. I should probably have bootstrapped it again before checking
it in, since it had been such a long time since it was initially
posted :-(
> Alexandre, please look into this,
I'm reverting the second part of the patch for now. I wasn't so sure
it was actually necessary (the problem I had was fixed with the first
half).
Here's what I'm checking in.
Thanks for reporting the problem and, again, apologies for the
lossage.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* reload1.c (reload_cse_move2add): Revert part of my 2003-05-09's
patch.
Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.393
diff -u -p -r1.393 reload1.c
--- gcc/reload1.c 9 May 2003 17:16:54 -0000 1.393
+++ gcc/reload1.c 11 May 2003 02:11:02 -0000
@@ -9259,15 +9259,9 @@ reload_cse_move2add (first)
int success = 0;
if (new_src == const0_rtx)
- {
- if (INTVAL (src) == reg_offset [regno])
- /* See above why we create (set (reg)
- (reg)) here. */
- success
- = validate_change (next, &SET_SRC (set), reg, 0);
- else
- success = 0;
- }
+ /* See above why we create (set (reg) (reg)) here. */
+ success
+ = validate_change (next, &SET_SRC (set), reg, 0);
else if ((rtx_cost (new_src, PLUS)
< COSTS_N_INSNS (1) + rtx_cost (src3, SET))
&& have_add2_insn (reg, new_src))
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer