https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69943
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- It's a long-standing issue that reassoc doesn't associate ! TYPE_OVERFLOW_WRAPS chains. It could do that to a limited extent (only cancelling ops that don't affect overflow) or fully if it re-writes the operation to unsigned arithmetic at commit time. Some way of detecting desired vs. just canonicalization transforms is required to avoid rewriting all signed integer ops into unsigned (well, maybe it's not that bad actually, who knows). I believe there is a duplicate PR about this somewhere.