https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71034

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I think this is the optimizations that should be done:
> abs(x) < 0 -> x != x

for x=NaN, abs(x) is NaN, and NaN<0 is false. So the current simplification to
false seems correct.

> abs(x) >= 0 -> x u== x

x == x. I'd like to canonicalize it to x ord x, but that's a different issue.

> abs(x) == 0 -> x == 0
> abs(x) <= 0 -> x == 0 (since this is an ordered comparison)

ok

> abs(x) u< 0 -> false
> abs(x) u>= 0 -> false

u<, u>= are true if an argument is NaN... u< can simplify to x unord x, and u>=
is always true.

> abs(x) u== 0 -> x == 0

x u== 0

Reply via email to