https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127785
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|!__builtin_isunordered (a, |[15/16/17 Regression]
|b) & (a != b) folded to |!__builtin_isunordered (a,
|LTGT raises FE_INVALID for |b) & (a != b) folded to
|a quiet NaN |LTGT raises FE_INVALID for
| |a quiet NaN
Last reconfirmed| |2026-10-08
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |15.4
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
I think we can just remove the pattern:
```
(simplify
(bit_and:c (ordered @0 @1) (ne @0 @1))
(ltgt @0 @1))
```
As it should be correctly handled by this pattern:
```
/* Optimize (a CMP b) &| (a CMP b)
using the helper combine_comparisons function. */
(for bitop (bit_and bit_ior bit_xor simple_comparison)
(for cmp1 (tcc_comparison)
(for cmp2 (tcc_comparison)
(simplify
(bitop (cmp1 @0 @1) (cmp2 @0 @1))
(with rescmpcode (tcc_comparison)
{
tree_code rescmpcode;
tree res;
bool honor_nans = HONOR_NANS (@0);
rescmpcode = combine_comparisons (bitop, cmp1, cmp2,
type, honor_nans, &res);
}
(if (rescmpcode == INTEGER_CST)
{ res; }
(if (TREE_CODE_CLASS (rescmpcode) == tcc_comparison)
(rescmpcode @0 @1))))))))
```