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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> U | N < U -> false
> U & N <= U -> true
> U & N > U -> false
> U | N >= U -> true
> 
> >I don't see an easy way to combine these two patterns though.
> I totally missed that the for loop is a pair for.
> 
> (for cmp   (lt      ge      le      gt     )
>      bitop (bit_ior bit_ior bit_and bit_and)
>  (simplify
>   (cmp (bitop @0 INTEGER_CST@1) @0)
>   (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && TREE_UNSIGNED (TREE_TYPE (@0)))
>    ({ constant_boolean_node (cmp == GE_EXPR || cmp == LE_EXPR, type); })))

@1 here does not even need to be a constant even ...

And that might solve PR 94884 even.

Reply via email to