This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c/8068
- From: Arend Bayer <arend dot bayer at web dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Richard Henderson <rth at redhat dot com>, Geert Bosch <bosch at gnat dot com>, Andreas Jaeger <aj at suse dot de>, Florian Weimer <fw at deneb dot enyo dot de>, <gcc-patches at gcc dot gnu dot org>, Michal Ludvig <mludvig at suse dot cz>
- Date: Tue, 4 Mar 2003 02:24:56 +0100 (CET)
- Subject: Re: PR c/8068
Jan Hubicka wrote:
> Hi,
> The problem is that patch causes GCC to use divti in
> gnat.os_lib.argument_string_to_list where we previously optimized
> everything out. This is caused by the second hunk of the patch. Isn't
> it supposed to improve code quality?
No, it was supposed to arrive at the same code faster.
I had assumed that "x*5" is treated equally to "5*x" in extract_muldiv.
However, extract_muldiv implicitly assumes that if one of the two
arguments (of a commutative operation) is a constant, then this is
the 2nd one. If I read the code correctly, this is guarantueed by
a normalization in fold() earlier on.
While this could certainly be better commented, I apologize for not
seeing this in extract_muldiv itself.
Maybe it's best to revert that part of the patch.
Arend