https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86628
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- We already simplify some simple cases like x*t/t -> x in match.pd. Larger cases are for a pass like reassoc. In this particular case, we could also imagine somehow noticing that (x*y)*z is better reassociated as x*(y*z) because y*z is already computed. A later pass would then cleanup x*t/t. Simplifying the unsigned case looks wrong to me.