This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: possible problem with C implied intermediate variable sizerequirements -> rtl mapping ?
- From: Paul Schlie <schlie at comcast dot net>
- To: Paul Koning <pkoning at equallogic dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 21 Oct 2004 21:10:34 -0400
- Subject: Re: possible problem with C implied intermediate variable sizerequirements -> rtl mapping ?
Yup, you're absolutely correct.
So in general, there is no practical need nor benefit to size promoting
operands, or implied temporaries beyond the size of their widest need?
(where widest need is the size, beyond which, an operand's size would
not effect the logical or arithmetic result of a specified computation)
Yes I hope?
Thank you, -paul-
> From: Paul Koning <pkoning@equallogic.com>
>> From: Paul Schlie
>> Incorrectly yielding:
>>
>> r2:qi = plus r1:qi r1:qi ; where r2:qi = char loosing the required
>> r0:qi = plus r2:qi r1:qi ; intermediate precision specified by C ?
>
> But that has the same semantics, because of modulo arithmetic. Since
> you can't tell the difference (other than that execution may be
> faster) it's allowed. Right?
>
> The same would hold with some other operations -- though not for
> comparisons, nor for division.
>
> For example, if you only see QI operations in
> if ((y + y) != '\0') { ... }
> that would seem to be a different matter.
>