https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84756
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- We immediately narrow "return (Longer)a*b;" to "return a*b;" which makes it hard to CSE later. If you can, it would be better to write the code as: Longer mul = (Longer)a*b; ... use mul twice ... Not sure what the best place would be for this optimization. Somewhere in RTL when we don't care about signed/unsigned? Earlier in value numbering, checking for each mult if a widening version is already available? Other, say like we check if cos and sin are called on the same argument?