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 Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Steve Ellcey <sje at cup dot hp dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 09 May 2005 12:40:48 +0100
- Subject: Re: How can I write an empty conversion instruction
- References: <200505062059.NAA19579@hpsje.cup.hp.com> <20050507031445.GB23300@redhat.com>
On Sat, 2005-05-07 at 04:14, Richard Henderson wrote:
> 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.
Is that really valid? I would have thought it would break the data
flow.
R.