https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96696
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Do we want to do it in match.pd though, perhaps with :s or single_use check?
For GIMPLE it is 2 operations to 2 operations transformation, although
multiplication might often be more expensive than subtraction.
Or in backends only based on costs? I mean, x - (x % y) is actually longer so
might not the best idea e.g. for -Os.
But I'm more worried about the CSE possibilities if some code around does x /
y.