Hi,
I had a question regarding the function vect_pattern_recog that is
triggered in the slp/vectorization pass.
In case the original code is already in vector form, for example below
is the original gimple dump of a vector function
;; Function lshift1_64 (null)
;; enabled by -tree-original
{
__vector unsigned long long D.4059 = { 2, 2 };
return <<< Unknown tree: compound_literal_expr
__vector unsigned long long D.4059 = { 2, 2 }; >>> * a;
}
This however does not go through the pattern recognition since
1. It is already in vector form
2. This check fails in slp pass
if (bb_vinfo->grouped_stores.is_empty ()
&& bb_vinfo->roots.is_empty ())
So my main question is, suppose this line of code (in this example v1 *
{2, 2}) do go through the pattern recognition, it could have generated
better code like v1 + v1 or v1 << {1,1}) which could result in
vectorization in certain target which does not have native double word
multiplication support, but might have double word shift or add.
Is this intended or is there a way have this code pattern recognized?
cc'ing the maintainers for vectorization component.
Thanks and Regards,
Avinash Jayakar