https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124555
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-03-17
Status|UNCONFIRMED |NEW
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=123575
Ever confirmed|0 |1
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
gimple_simplified to vect_iftmp.61_195 = ABS_EXPR <vect__65.56_175>;
These match patterns need target_supports_op_p (like was done in
r16-7116-g26723879292eda):
/* (A - B) >=/> 0 ? (A - B) : (B - A) same as abs (A - B) */
(for cmp (ge gt)
(simplify
(cnd (cmp (minus@0 @1 @2) zerop) @0 (minus @2 @1))
(if (!HONOR_SIGNED_ZEROS (type)
&& !TYPE_UNSIGNED (type))
(abs @0))))
/* (A - B) <=/< 0 ? (A - B) : (B - A) same as -abs (A - B) */
(for cmp (le lt)
(simplify
(cnd (cmp (minus@0 @1 @2) zerop) @0 (minus @2 @1))
(if (!HONOR_SIGNED_ZEROS (type)
&& !TYPE_UNSIGNED (type))
(if (ANY_INTEGRAL_TYPE_P (type)
&& !TYPE_OVERFLOW_WRAPS (type))
(with {
tree utype = unsigned_type_for (type);
}
(convert (negate (absu:utype @0))))
(negate (abs @0)))))