This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: split lui_movf pattern on mips?
- From: "Amker.Cheng" <amker dot cheng at gmail dot com>
- To: "Amker.Cheng" <amker dot cheng at gmail dot com>, gcc at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Tue, 4 May 2010 13:31:49 +0800
- Subject: Re: split lui_movf pattern on mips?
- References: <v2we8b251c81004292316i5aff7334j54ec11070fa347a1@mail.gmail.com> <87sk6bmt9x.fsf@firetop.home>
> It's the encoding of 1.0f (single precision). ?The point is that we want
> something we can safely compare with 0.0f using floating-point instructions.
> "Safe" means "without generating any kind of exception", so a subnormal
> representation like 0x00000001 isn't acceptable. ?1.0f seems as good a
> value as any.
>
> Yes, this is OK. ?Your split looks good, but I don't see any reason
> for the !CANNOT_CHANGE_MODE_CLASS condition.
>
> Couple of minor suggestions:
>
> ?- There is no need for the double quotes around the { ... }.
> ? ?Plain { ... } is better. ?(Support for plain { ... } was
> ? ?added a few years ago, so you can still see some older code
> ? ?that uses "{ ... }". ?But { ... } is better for new code.)
>
> ?- It's generally better to restrict match_dups to things
> ? ?that depend on the operands of the original insn.
> ? ?In the above, it'd be better to replace (match_dup 4)
> ? ?with (const_int 0) and then not set operands[4] in the
> ? ?C code. ?(match_dup 3) is OK as an exception because
> ? ?read-rtl.c doesn't support hex constants yet...
Thanks, learned a lot from your detailed explanation.
--
Best Regards.