This is the mail archive of the
mailing list for the GCC project.
Re: Expansion of narrowing math built-ins into power instructions
On Wed, Aug 14, 2019 at 08:23:27PM +0000, Joseph Myers wrote:
> On Wed, 14 Aug 2019, Segher Boessenkool wrote:
> > Does something like
> > float d; double a, b, x;
> > ...
> > d = fadd (a + x, b - x);
> > work as wanted, with such a representation? It would simplify (does it?) to
> > d = fadd (a, b);
> > but is that allowed?
> It's not allowed, but neither is simplifying (a + x) + (b - x) into (a +
> b), when contraction isn't allowed.
Ah of course. And we already should not do such simplification on RTL,
when contraction is disallowed.
So yeah it should work fine I think. A new RTL code would be best (it
would be silly to have to make an unspec for it in every port separately),
but an unspec is of course easiest for now.