Some minor HONOR_NANS improvements to match.pd
authorRoger Sayle <roger@nextmovesoftware.com>
Wed, 16 Mar 2022 09:25:34 +0000 (09:25 +0000)
committerRoger Sayle <roger@nextmovesoftware.com>
Wed, 16 Mar 2022 09:25:34 +0000 (09:25 +0000)
commit7690bee9f36ee02b7ad0b8a7e7a3e08357890dc0
tree96d0cfb2b5a7b18bdc78e06cb72d2183f08f59af
parentab46fc7c3bf01337ea4554f08f4f6b0be8173557
Some minor HONOR_NANS improvements to match.pd

Tweak the constant folding of X CMP X in when X can't be a NaN.

2022-03-16  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
* match.pd (X CMP X -> true): Test tree_expr_maybe_nan_p
instead of HONOR_NANS.
(X LTGT X -> false): Enable if X is not tree_expr_maybe_nan_p, as
this can't trap/signal.
gcc/match.pd