[Bug target/106022] [12/13 Regression] Enable vectorizer generates extra load

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 21 06:41:10 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106022

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #6)
> Created attachment 53169 [details]
> A patch
> 
> This patch multiplies the vector store cost by the number of scalar elements
> in
> a word to properly compare scalar store cost against vector store cost.

But that's not "properly" but "wrong" ...

Note we already cost the vector load from the constant pool so the vector
side costing is correct.

What's eventually imprecise is the scalar cost where you could anticipate
store merging, but adjusting the vector cost side is just wrong.


More information about the Gcc-bugs mailing list