http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53533
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-13 09:43:15 UTC --- (In reply to comment #12) > (In reply to comment #10) > > But maybe allowing const_vector in (some of) the define_insn_and_split would > > be the way to go ... > > Maybe. It certainly would ease some of the simplifications. > At the moment I don't think we can go from > > mem -> const -> simplify -> const ->newmem > > On the other hand, for this particular test case, where all > of the vector_cst elements are the same, and a reasonably > small number of bits set, it would be great to be able to > leverage synth_mult. I agree, though that should possibly be done earlier. > The main complexity for sse2_mulv4si3 is due to the fact that > we have to decompose the operation into V8HImode multiplies. > Whereas if we decompose the multiply, we have the shifts and > adds in V4SImode. Well, for a constant multiplier one can avoid the shuffles of the multiplier - we seem to use v2si -> v2di multiplies with sse2_mulv4si3.