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

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #18)
> I think the only thing left is supporting floating point.

Another testcase for integer but with a nop_conversion:
```
int f(int a)
{
        unsigned b = a;
        int t = (b >= 3);
        return t | (a == 0);
}
```

Without the nop_conversion, the pattern:
/* y == XXX_MIN || x < y --> x <= y - 1 */
(simplify
 (bit_ior:c (eq:s @1 min_value) (lt:cs @0 @1))
  (if (INTEGRAL_TYPE_P (TREE_TYPE (@1))
       && TYPE_OVERFLOW_WRAPS (TREE_TYPE (@1)))
  (le @0 (minus @1 { build_int_cst (TREE_TYPE (@1), 1); }))))

Hits.

I will look into supporting the case where there is a nop_conversion for the @0
in the lt ...

Reply via email to