https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68131
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Marc Glisse from comment #3) > (In reply to Richard Biener from comment #2) > > We indeed do not have this optimization, only A + CST CMP CST to A CMP CST' > > and related. Note that _9 might be negative so we also need range info > > for this. VRPs symbolic range stuff isn't good enough to simplify this. > > If we want to simplify directly to false, I would expect a match.pd pattern > using tree_expr_nonnegative_p to work in this case (conversion from a > smaller unsigned). By the way, maybe tree_single_nonnegative_warnv_p could > try looking at get_range_info before forwarding to > gimple_stmt_nonnegative_warnv_p. Oh I filed PR 111959 (and will be submitting a patch later today) for that.