https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128748
--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Confirmed. I'd suggest to simply remove the folding(s) instead.
Right because there is already this:
```
#if GIMPLE
/* ABS_EXPR <X> > C -> (unsigned) (X + C) > 2 * C, and the same for <= and
for ABSU_EXPR. */
(for op (abs absu)
(for cmp (gt le)
(simplify
(cmp (op@2 @0) INTEGER_CST@1)
(if ((op == ABSU_EXPR || TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0)))
&& !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (@0))
&& single_use (@2)
&& wi::ge_p (wi::to_wide (@1), 0, SIGNED)
&& !tree_int_cst_equal (@1, TYPE_MAX_VALUE (TREE_TYPE (@0))))
(with { tree utype = unsigned_type_for (TREE_TYPE (@0)); }
(cmp (plus (convert:utype @0) (convert:utype @1))
{ wide_int_to_tree (utype, wi::to_wide (@1) * 2); }))))))
#endif
```
For gimple. Which has the check for TYPE_MAX_VALUE here.