PATCH, middle-end: fix semantic bug in dse.c

Jakub Jelinek jakub@redhat.com
Tue May 5 23:02:00 GMT 2009


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)
...
else
{
if (... && all_positions_needed_p (...) && replace_read (...))
}
so I'd just add
 	      && store_info->cse_base == base
+	      && width != -1
 	      && offset >= store_info->begin

	Jakub



More information about the Gcc-patches mailing list