https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126627
Bug ID: 126627
Summary: `(a&-a) < 0` -> `a == INT_MIN`
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: easyhack, missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
For signed comparisons:
`(a&-a) < 0` -> `a == INT_MIN`
`(a&-a) >= 0` -> `a != INT_MIN`
That is if a is signed or `(a & -a)` is casted to signed integer.