This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: accept opaque vectors as compatible to same-size,same-element-size vectors in binary operations (Was: Re: Ping: RFA: Consider int and same-size short as equivalent vector components)
- From: Joern Rennecke <joern dot rennecke at embecosm dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: gcc-patches at gcc dot gnu dot org, oseph Myers <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Thu, 05 Sep 2013 12:43:42 -0400
- Subject: RFA: accept opaque vectors as compatible to same-size,same-element-size vectors in binary operations (Was: Re: Ping: RFA: Consider int and same-size short as equivalent vector components)
- Authentication-results: sourceware.org; auth=none
- References: <20130905105001 dot e8r93qo2aw48g0sc-nzlynne at webmail dot spamcop dot net> <52289BEE dot 5060400 at acm dot org>
Quoting Nathan Sidwell <nathan@acm.org>:
On 09/05/13 15:50, Joern Rennecke wrote:
Apart from Paolo Carlini's suggestion to improve the wording of the
ChangeLog,
this patch hasn't been reviewed for more than a week:
http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01634.html
I suppose the original subject has become a bit misleading...
I've changed it in this replay, though it becomes quite a mouthful...
I don't think the issue is whether they should be treated as
equivalent, but whether there's an implicit promotion from (say)
vec-of-int to vec-of-long. For instance, given:
int_vec_t i;
long_vec_t l;
if:
s < l
is well formed, then think it reasonable for:
void Foo (long_vec_t);
...
Foo (i);
to be well formed too. Is that true with your patch?
My patch doesn't touch this area. First, what it changes is only type
checking for binary operators applied to vectors. Second, the types
for which the type checking is relaxed are opaque vectors, types that
are generated by gcc as intermediate results, and, as I mentioned in
the patch posting, the documentation for TYPE_VECOR_OPAQUE says that
"the frontends should not emit warnings
about missing conversions to other vector types of the same size."