On 13/06/16 14:58, Marc Glisse wrote:
On Mon, 13 Jun 2016, Kyrill Tkachov wrote:

This patch allows the vectoriser to synthesize multiplications by an integer constant using the algorithms determined by choose_mult_variant from expmed.c. choose_mult_variant returns an algorithm structure that is a linked list of steps describing how to synthesize an integer multiplication by any constant using shifts, adds, subs, and negation.

The new function vect_synth_mult_by_constant that does all the hard work is 
very similar in structure to expand_mult_const from expmed.c but it operates on 
gimple SSA rather than RTL.

Note that we synthesize the multiplications if the target does not support a vector multiplication in the current vector mode we're processing. So, for aarch64 this effectively means V2DI (aarch64 has a vector multiply instruction for narrower inner modes).

I guess I should drop my patch 
https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00881.html

This one seems much better.


Sorry for the conflict. I had actually worked on this back in November as a 
quick prototype and then
got swamped with bug fixing for GCC 6 and only just got around to taking this 
up again.

Kyrill

Reply via email to