This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Expansion of narrowing math built-ins into power instructions


> The RTL needs to be something that
> does *not* match the combination of separate operations (just as fma has
> its own RTL, and a separate pass is responsible for converting separate

So do I need to introduce fadd's own RTL just as fma which would emit
a fused instruction while -ffp-contract is default (fast) and would
emit separate instructions like add in DFmode and then truncate to SF?
while -ffp-contract=off ? (just as fma)


On Tue, 13 Aug 2019 at 03:22, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Mon, Aug 12, 2019 at 09:20:18PM +0000, Joseph Myers wrote:
> > On Mon, 12 Aug 2019, Segher Boessenkool wrote:
> >
> > > (define_insn "add_truncdfsf3"
> > >   [(set (match_operand:SF 0 "gpc_reg_operand" "=f,wa")
> > >     (float_truncate:SF
> > >       (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%d,wa")
> > >                (match_operand:DF 2 "gpc_reg_operand" "d,wa"))))]
> >
> > That sort of pattern is incorrect for a fused operation such as fadd,
> > because combine could match it for code that is supposed to do separate
> > addition and narrowing conversion.  The RTL needs to be something that
> > does *not* match the combination of separate operations (just as fma has
> > its own RTL, and a separate pass is responsible for converting separate
> > operations to fused ones in the -ffp-contract=fast case where it's
> > permitted).
>
> Ugh, we allow disabling contraction, I forgot.  Rats.
>
>
> Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]