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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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))
  (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
       && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0))
           || ((op == EQ_EXPR || op == NE_EXPR)
               && TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0))))
       && (CONSTANT_CLASS_P (@1) || single_use (@2)))
   (op @1 { build_zero_cst (TREE_TYPE (@1)); }))))

https://gcc.gnu.org/pipermail/gcc-patches/2017-October/484606.html describes
why there was a single use but I wonder if ranger now does not cause the need
for the single_use ....

Reply via email to