This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] restore bootstrap on ppc
On 9/12/07, Jan Hubicka <hubicka@ucw.cz> wrote:
> >
> > * fold-const.c (extract_muldiv_1): Do not simplify
> > var * c * c to var.
>
> Hi,
> it looks like this is only performance related patch that might've
> caused today regression on gzip and gcc:
> http://www.suse.de/~gcctest/SPEC-britten/CINT/sandbox-britten/recent.html
> http://www.suse.de/~gcctest/SPEC-britten/CINT/sandbox-britten/200709111625.int/
> It seems quite serious, so hopefully there is way around (or it might be
> a noise even if there was no changes in setup, we should see next run
> relatively shortly)
This patch was for correctness only. Another way to write the result
after the patch would be
if ((TYPE_OVERFLOW_UNDEFINED (ctype)
|| (TREE_CODE (ctype) == INTEGER_TYPE && TYPE_IS_SIZETYPE (ctype)))
&& ((code == MULT_EXPR && tcode == EXACT_DIV_EXPR)
|| (tcode == MULT_EXPR && code == EXACT_DIV_EXPR))
it tries to simplify a * C / C (or a / C * C) to a.
Richard.