https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87047
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect it is treating cost 0 as being free rather than unknown cost. And the x86 backend is returning 0 cost for the upper multiple.