https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87290
Bug ID: 87290
Summary: Optimize signed x % pow2p == cst
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
As mentioned in https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02005.html and
PR82853, we don't and should optimize signed x % 16 == 13 to x & (INT_MIN | 15)
== 13 and x % 16 == -13 to x & (INT_MIN | 15) == (-13 & (INT_MIN | 15)).