https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108447
--- Comment #9 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > I see fold_using_range::relation_fold_and_or > which sees relation1 VREL_LE and relation2 VREL_GE and !is_and, and because > of > relation_union (relation1, relation2) == VREL_VARYING fold it to 1. > But for floating point comparisons, LE | GE is not always true, it is true if > neither operand is NAN, otherwise false. Ah, it was the union not the intersect. So we need something here that would avoid resolving this to 1 if maybe_isnan() is true for either source operand.