This is the mail archive of the
mailing list for the GCC project.
Re: PATCH, middle-end: fix semantic bug in dse.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, sfr at canb dot auug dot org dot au
- Date: Wed, 6 May 2009 01:02:18 +0200
- Subject: Re: PATCH, middle-end: fix semantic bug in dse.c
- References: <1241563650.18420.22.camel@helios>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, May 06, 2009 at 08:47:30AM +1000, Ben Elliston wrote:
> I believe this patch is the right fix. Tested with a bootstrap on
> x86_64-linux (with BOOT_CFLAGS=-O2 and -Os), a regression test run on
> x86_64-linux and powerpc64-linux, and a complete comparison of all Linux
> kernel objects built with the cross compiler.
I think instead check_mem_read_rtx shouldn't be calling
all_positions_needed_p nor replace_read when width == -1.
I think there is only one place where this can happen, the other already has
if (width == -1)
if (... && all_positions_needed_p (...) && replace_read (...))
so I'd just add
&& store_info->cse_base == base
+ && width != -1
&& offset >= store_info->begin