This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RFC: PR14880 vec_duplicate or vec_select?
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dje at watson dot ibm dot com, gcc at gcc dot gnu dot org
- Cc: dorit at il dot ibm dot com
- Date: Fri, 5 Nov 2004 20:11:30 -0400
- Subject: RFC: PR14880 vec_duplicate or vec_select?
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