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)

Joern Rennecke joern.rennecke@embecosm.com
Thu Sep 5 16:43:00 GMT 2013


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."



More information about the Gcc-patches mailing list