https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103855
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The other way to fix this is during expand, look for the smallest mode which fits the range of the two operands of TRUNC_DIV_EXPR and there is a div optab for that mode and use that mode.