https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
--- Comment #5 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #4)
> The pattern:
> /* X - Y < X is the same as Y > 0 when there is no overflow.
>For equality, this is also true with wrapping overflow. */
> (for op
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
--- Comment #4 from Andrew Pinski ---
The pattern:
/* X - Y < X is the same as Y > 0 when there is no overflow.
For equality, this is also true with wrapping overflow. */
(for op (simple_comparison)
(simplify
(op:c @0 (minus@2 @0 @1))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
--- Comment #3 from Andrew Pinski ---
wait that is for unsigned types and we don't have an unsigned type here ..
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
--- Comment #2 from Andrew Pinski ---
The comment says:
/* To detect overflow in unsigned A - B, A < B is simpler than A - B > A.
However, the detection logic for SUB_OVERFLOW in tree-ssa-math-opts.cc
expects the long form, so we restrict
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96702
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement