This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How can I write an empty conversion instruction
- From: Richard Henderson <rth at redhat dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 6 May 2005 20:14:45 -0700
- Subject: Re: How can I write an empty conversion instruction
- References: <200505062059.NAA19579@hpsje.cup.hp.com>
On Fri, May 06, 2005 at 01:59:06PM -0700, Steve Ellcey wrote:
> I was wondering if anyone could tell me how to write an (empty)
> instruction pattern that does a truncate/extend conversion on a register
> 'in place'.
>
> All the conversions I see are like this one in ia64/ia64.md:
>
> (define_insn "extendsfdf2"
> [(set (match_operand:DF 0 "fr_register_operand" "=f")
> (float_extend:DF (match_operand:SF 1 "fr_register_operand" "f")))]
> ""
> "fnorm.d %0 = %1"
> [(set_attr "itanium_class" "fmac")])
>
> Where the source and the destination may or may not be the same
> register.
The best way is to have a post-reload splitter that splits the insn
into nothing at all.
r~