This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optimize manual byte swap implementations v3
On Wed, Feb 11, 2009 at 3:56 PM, Andreas Krebbel
<krebbel@linux.vnet.ibm.com> wrote:
>> tree INTEGER_CSTs should be always canonical (that is, properly
>> sign or zero-extended to the full two-HOST_WIDE_INT width). So,
>> at least in theory (;)) this part is not necessary (likewise in
>> int_cst_value). So, can you wrap this inside #ifdef ENABLE_CHECKING
>> and assert that it doesn't change val?
>
> But if the value is zero-extended to the full two-HOST_WIDE_INT width it
> still has to be sign-extended since the return value is expected to be a
> signed HOST_WIDE(ST)_INT. I don't think we can get rid of this.
Ok, if it is supposed to turn an unsigned number into a signed one
I agree. But do we really want this in this case?
Richard.
> Bye,
>
> -Andreas-
>