https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108068
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Priority|P3 |P2 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Optimizing statement if (_5 != 0) Visiting conditional with predicate: if (_5 != 0) With known ranges _5: [unsupported_range] UNDEFINED Predicate evaluates to: DON'T KNOW LKUP STMT _5 ne_expr 0 0>>> COPY _5 = 0 <<<< COPY _5 = 0 the issue is we do bool can_infer_simple_equiv = !(HONOR_SIGNED_ZEROS (op1) && (TREE_CODE (op1) == SSA_NAME || real_zerop (op1))); but real_zerop is false for Decimal zero. That's because "Trailing zeroes matter for decimal float constants, so don't return 1 for them.". We'd need a real_maybe_zerop () for this usage. We have other !real_zerop checks in match.pd and elsewhere, those are susceptible as well. Joseph, do you think adding DECIMAL_FLOAT_MODE_P checks in users is what we want to do or do you think a real_nonzerop would be more appropriate here? I guess DOM want's to ask whether op1 may compare equal to zero.