https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757

--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #4)
> If N is a power of two optimising this to a/N is valid, but for other values
> of N it is not (division is not the inverse of multiplication in C).  It also
> only works for unsigned of course.

Isn't this valid for any N & M, such that M is a factor of N?  Meaning, as long
as N / M has no remainder, it seems like this should be ok.  For example, N =
30 & M = 2 should be just as ok as the N = 32 & M = 2 case, correct?

Reply via email to