This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wide-int] Do not treat rtxes as sign-extended
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: gcc-patches at gcc dot gnu dot org, zadeck at naturalbridge dot com
- Date: Sat, 02 Nov 2013 11:26:06 +0000
- Subject: Re: [wide-int] Do not treat rtxes as sign-extended
- Authentication-results: sourceware.org; auth=none
- References: <874n7vkse3 dot fsf at talisman dot default> <E5A667D7-026A-428D-A8C3-DFC7550BD0B9 at comcast dot net>
Mike Stump <mikestump@comcast.net> writes:
> On Nov 2, 2013, at 3:30 AM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
>> Bah. After all that effort, it turns out that -- by design --
>> there is one special case where CONST_INTs are not sign-extended.
>
> I'm thinking this needs commentary in wide-int.h, though, not sure what
> we'd say...
AIUI the only valid values of STORE_FLAG_VALUE are 1 and -1. If others
are used, the rtx decompose routine would need to use the scratch array.
So wide-int itself shouldn't need to care. It just means that a
1-precision rtx input can be sign or zero extended, just like for
N-precision trees. And we indicate that by setting is_sign_extended
to false.
Thanks,
Richard