This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: PR14880 vec_duplicate or vec_select?
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Dorit Naishlos <dorit at il dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 05 Nov 2004 20:36:53 -0500
- Subject: Re: RFC: PR14880 vec_duplicate or vec_select?
- References: <20041106001130.GA16729@redhat.com>
The change is not for the auto-vectorizer, it is for GCC's common
vector operation support. GCC cannot assume much about UNSPEC, but can
know about vec_merge, vec_select, vec_concat, vec_duplicate. It is best
to use the standard patterns when available.
The Altivec vspltM (vec_splat) instruction sets each element of
the result to the specified element of the input vector. One could
describe it as selecting the same source vector sub part into each element
of the result (vec_select) or duplicating the 1-element sub-vector into
all elements (vec_duplicate). I am not sure how this should be
canonicalized in GCC or if there already is a preferred form.
David