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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here are the signed versions of </<=/>/>=:
`s <  (s != 0)` is `s <  0`
`s <= (s != 0)` is `s <= 1`
`s >  (s != 0)` is `s >  1`
`s >= (s != 0)` is `s >= 0`

`s <  (s == 0)` is `s <= 0`
`s <= (s == 0)` is `s <= 0`
`s >  (s == 0)` is `s >  0`
`s >= (s == 0)` is `s >  0`


Here are the unsigned versions with `uns == 0` since I had missed those before:

`uns <  (uns == 0)` is `uns == 0`
`uns <= (uns == 0)` is `uns == 0`
`uns >= (uns == 0)` is `uns != 0`
`uns >  (uns == 0)` is `uns != 0`

I noticed LLVM does not catch these either.

Reply via email to