https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128672
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-11-12
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Value numbering stmt = _5 = _4 / 2;
Matching expression match.pd:3548, gimple-match-5.cc:116
Matching expression match.pd:3552, gimple-match-10.cc:81
Applying pattern match.pd:4284, gimple-match-3.cc:9385
Inserting name _10 for expression -_2
Setting value number of _5 to _10 (changed)
Inserted _11 = -_2;
Making available beyond BB2 _11 for value _10
that's
/* -(T)(-A) -> (T)A
Sign-extension is ok except for INT_MIN, which thankfully cannot
happen without overflow. */
(simplify
(negate (convert (negate @1)))
(if (INTEGRAL_TYPE_P (type)
&& (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@1))
|| (!TYPE_UNSIGNED (TREE_TYPE (@1))
&& TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@1))))
&& !TYPE_OVERFLOW_SANITIZED (type)
&& !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (@1)))
(convert @1)))