https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103417
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 51870 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51870&action=edit gcc12-pr103417.patch Untested fix. Handling GE in that simplification is clearly bogus, we should just fold it to true elsewhere, not bother with it (it doesn't handle LT either, which should also fold to false elsewhere). Handling LE and GT there isn't wrong, but makes no sense. Elsewhere we canonicalize x > 0U into x != 0U and x <= 0U into x == 0U and for signed it was handling only EQ and NE already before.