This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix regression parts of PR58742
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Oct 2013 13:50:56 +0200
- Subject: Re: [PATCH] Fix regression parts of PR58742
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1310211329130 dot 11149 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 21, 2013 at 01:30:37PM +0200, Richard Biener wrote:
> This fixes a regression introduced in GCC 4.2 after which we no
> longer fold (unsigned) (X /[ex] 4) * 4 to (unsigned) X.
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Don't we want to do the same optimization on GIMPLE?
I mean, if the testcase is
fx (int *b, int *e)
ptrdiff_t p = e - b;
return b + p;
(or s/ptrdiff_t/long long/, etc.)?