https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110293

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is some more optimizations where the inner CMP is not EQ/NE:
signed:
x == (x <= CST) -> CST == 0 ? false : CST < 0 ? x == 0 : x == 1
x == (x  < CST) -> CST == 1 ? false : CST <= 0 ? x == 0 : x == 1

unsigned:
x == (x u<= CST) -> CST == 0 ? false : x == 1 (note 0 should already be
handled)
x == (x u<= CST) -> CST == 0 ? x == 0 : CST == 1 ? false : x == 1 (note 0/1
should be handled already)

Reply via email to