Re: compilation results with avr-gcc 4.8.3

Joern Rennecke <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CAMqJFCpgiAHTi5dKEXUW9bsH7hqjeAEnMwFgeeYu4jEad1XXkw@mail.gmail.com>
On 25 September 2014 21:11, Joerg Wunsch <[email protected]> wrote:
> As Christian Schmidt wrote:
>
>> Is it fair to conclude that the ~
>> operator, applied to an unsigned char, does produce an int as output
>> instead of the input type?
>
> Yes, this is exactly what the C standard promotion rules require.
>
> Well, to be exact, they *require* it behaves "as if" it were promoted
> to "int", so if the sign extension has no net effect to the result, it
> might be left out as well.  So in that sense, it might be considered a
> "missed optimization" bug in GCC here, but it's probably always hard
> to catch all those situations well were the integer promotion could be
> bypassed.

The first principle is to split all the multi-word operations into single
operations to expose them to the late rtl optimizers, but the branches
need some more specific peepholes.

_______________________________________________
AVR-GCC-list mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
avr-opt-promotion (application/octet-stream, 4.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.