On 10/02/14 04:40, Eric Botcazou wrote:
[This is an old discussion about useless integral conversions introduced
behind the back of the front-end by the routines in convert.c]

I don't like re-introducing that inconsistency.

OK.

Maybe instead make convert.c do if (!TYPE_UNSIGNED) unsigned_type_for ()
instead?  I notice that all callers of [un]signed_type_for are in
"premature" optimizations convert.c performs (that better should be done
in fold-const.c).

Yes, that works for me too, patch attached, it makes sure convert_to_integer
only fiddles with the type when strictly necessary.  Tested on x86-64/Linux.


2014-10-02  Eric Botcazou  <ebotca...@adacore.com>

        * convert.c (convert_to_integer): Do not introduce useless conversions
        between integral types.
OK.
Jeff

Reply via email to