Hi Richard,
> Oh, I see - that's very special then and the pattern in the comment
> does not include this conversion. I think you can simplify the checking
> done by requiring types_match (TREE_TYPE (@1), TREE_TYPE (@3))
> and by noting that the types of @0, @2 and @4 are the same
> (you don't se
On Tue, Feb 1, 2022 at 4:21 PM Arjun Shankar wrote:
>
> > +/* As a special case, X + C < Y + C is the same as X < Y even with wrapping
> > + overflow if X and Y are signed integers of the same size, and C is an
> > + unsigned constant with all bits except MSB set to 0 and size >= that of
> > +
> +/* As a special case, X + C < Y + C is the same as X < Y even with wrapping
> + overflow if X and Y are signed integers of the same size, and C is an
> + unsigned constant with all bits except MSB set to 0 and size >= that of
> + X/Y. */
> +(for op (lt le ge gt)
> + (simplify
> + (op (pl
On Tue, Feb 1, 2022 at 5:54 AM Arjun Shankar via Gcc-patches
wrote:
>
> Expressions of the form "X + CST < Y + CST" where X and Y are of int
> type and CST is of unsigned type with only the MSB on can be simplified
> to "X < Y" because "X + 0x8000" increases monotonically with X.
+/* As a spe
Expressions of the form "X + CST < Y + CST" where X and Y are of int
type and CST is of unsigned type with only the MSB on can be simplified
to "X < Y" because "X + 0x8000" increases monotonically with X.
gcc/
* match.pd (X + C < Y + C -> X < Y, if C is 0x8000): New
simplif