On Tue, Mar 9, 2021 at 9:57 PM Ivan Sučić <suci...@outlook.com> wrote:
>
> Richard Biener wrote:
> >I don't think removing all code is OK since it would
> >allow combining x == y || x > y to x >= y which may
> >trap.  The bugreport suggests to alter the last
> >test to something like
> >
> > if (trap && !ltrap && !rtrap)
> > return NULL_TREE;
> >
> >thus if we manage to remove a trap (!trap) the transform
> >is OK.
> Hi,
> Could you please explain this:
> combining x == y || x > y to x >= y which may trap.
> If x is a nan then x == y II x > y are false. The expr x >= y is false, too. 
> Where is the error?

Maybe my example was not good but neither the bugreport nor your
submission explains that eliding the short-cutting is always OK.
And I'm not too familiar with all the specialities of FP compares.
I've reviewed as to what the bugreport suggests (allow traps to go away),
but the patch does seemingly more.

CCing Roger so he might explain.

Richard.

Reply via email to