https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111151
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-08-25 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- a = MAX_EXPR <(long long unsigned int) t + 4503599, 32739>; b = a * 18446744073709551606; printf ((const char *) "%llu (Split calculation result)\n", b); c = MAX_EXPR <(long long unsigned int) t * 18446744073709551606 + 18446744073664515626, 18446744073709224226>; printf ((const char *) "%llu (Combine calculation result)\n", c); smells like extract_muldiv, but Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:5475, generic-match-8.cc:1606 Applying pattern match.pd:4256, generic-match-8.cc:2977 Applying pattern match.pd:5113, generic-match-4.cc:2339 Applying pattern match.pd:4392, generic-match-8.cc:3091 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:4359, generic-match-8.cc:3047 Applying pattern match.pd:5475, generic-match-8.cc:1606 Applying pattern match.pd:4256, generic-match-8.cc:2977 Applying pattern match.pd:5113, generic-match-4.cc:2339 Applying pattern match.pd:4392, generic-match-8.cc:3091 it would be nice to have fold-const.cc report "matches" as well. Maybe replace all return <X>; with return report (<X>); with a report macro doing dumping like above if <X> is non-NULL.