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: 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



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