https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103614
Bug ID: 103614 Summary: Modulo equality optimization Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: getchar_gnu at hotmail dot com Target Milestone: --- Code: https://gcc.godbolt.org/z/99s5fc695 Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853 (signed)x%145==0, (unsigned)x%145==0, (unsigned)x%145==1 are all optimized into form x*c1+c2<c3, but (signed)x%145==1 isn't. (Intended to compile as (unsigned)(x-1)*266584177<14810233 )