This is the mail archive of the
mailing list for the GCC project.
Re: Using gen_int_mode instead of GEN_INT minot testsuite fallout on MIPS
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Graham Stott <graham dot stott at btinternet dot com>, James Greenhalgh <james dot greenhalgh at arm dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Sep 2013 17:19:14 +0100
- Subject: Re: Using gen_int_mode instead of GEN_INT minot testsuite fallout on MIPS
- Authentication-results: sourceware.org; auth=none
- References: <CAFiYyc3o+GLpPnNb=E1ru9rOJxuVkxBMsMEeE99wRm8SRWrmCg at mail dot gmail dot com> <1378833157-11511-1-git-send-email-james dot greenhalgh at arm dot com> <87y574mr2h dot fsf at talisman dot default> <1378900963 dot 71148 dot YahooMailNeo at web87402 dot mail dot ir2 dot yahoo dot com> <87y573kxse dot fsf at talisman dot default> <CAFiYyc1aR91hKgkGMbLfVtH0vmXOBPruaiPRqQ5-FCA5gTDMWg at mail dot gmail dot com>
Richard Biener <firstname.lastname@example.org> writes:
> On Wed, Sep 11, 2013 at 8:39 PM, Richard Sandiford
> <email@example.com> wrote:
>> Graham Stott <firstname.lastname@example.org> writes:
>>> Hi Richard,
>>> There is some minor testsuite fallout with these patches on MIPS a
>>> couple of tests (see below)ICE ingen_int_mode () in both these ICE the
>>> mode is CCmode.
>> Hmm, interesting. I suppose gen_int_mode should handle CC modes,
>> since there's no other constant rtx that can be used instead. OTOH,
>> like you say, it doesn't really make sense to apply try_const_anchor
>> to CCmode.
> Can we statically identify the places that build CCmode integers? In that
> case a gen_cc_const () function would be more appropriate ...
I think it'd be hard to do statically. E.g. it wasn't really obvious
that this particular cse code might have to handle CCmode.
It might be better to have a different rtx for MODE_CC constants,
hopefully then just using gen_rtx_CONST_CC (...) directly.
It'd be a lot of work though.
> Do we know that CCmode fits into a HWI btw?
The precision of CCmode is effectively left undefined, so it's hard to say.
But it always seems to have worked in practice.
I suppose the most likely values are 0, 1 and -1, although MIPS did for
a while have 1.0f as the CC value for "true".
> (what about partial integer modes which have weird precision (none)?)
We don't really model that properly yet. Partial modes are just defined
using something like:
i.e. without the partial precision. But trunc_int_for_mode is based on
GET_MODE_PRECISION, so should just work if a proper precision is added.
(There are other places that wouldn't just work, but that's something
that the wide-int branch will help with. It almost feels like you were
setting me up for that answer. :-))