RFC: PR14880 vec_duplicate or vec_select?
Aldy Hernandez
aldyh@redhat.com
Sat Nov 6 00:11:00 GMT 2004
Hi David. Hi Dorit.
I'm looking at 14880, and it suggests vecspltX patterns should be modeled
with vec_duplicate, presumably to optimize with the vector optimizer.
I think what we want is vec_select, not vec_duplicate.
Take vspltw for instance:
vspltw v0,v1,3
The specs say, we should put v1[3] into each element of v0.
I think the correct way to model this would be:
(set (reg:V4SI v0)
(vec_select:V4SI (reg:V4SI v1)
(parallel [(const_int 3)
(const_int 3)
(const_int 3)
(const_int 3)])))
What do you guys think? I'm not familiar with the vectorizer, so I don't
know what patterns are actually supported or used.
Let me know, so I can fix the patterns.
Cheers.
Aldy
More information about the Gcc
mailing list