This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]