https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37150
--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> --- Oh, and the duplicate costing is from the repeated use of pol_z(:,0,kg) and similar terms. It's counted only once during scalar cost compute and not at all if not all of the uses are vectorized.