This is the mail archive of the
mailing list for the GCC project.
Re: Ping: RFA: Consider int and same-size short as equivalent vector components
- From: Jason Merrill <jason at redhat dot com>
- To: Joern Rennecke <joern dot rennecke at embecosm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joseph Myers <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Sat, 07 Sep 2013 12:53:46 -0400
- Subject: 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> <522A6CDC dot 3050403 at redhat dot com> <20130906205853 dot wujaxgydws4c08c4-nzlynne at webmail dot spamcop dot net>
On 09/06/2013 08:58 PM, Joern Rennecke wrote:
vector_targets_convertible_p is used for pointer types. The callers
do a hop, skip and dance to check that the qualifiers are satisfactory,
while OTOH vector_targets_convertible_p ignores the number of elements
in the vectors. That's fine with vectors as we can consider, say,
a vector of 8 elements as two consecutive vectors of 4 elements, and
that works fine with pointers.
vector_types_convertible is used for pointer value types.
It could in principle call vector_targets_convertible_p as a subroutine,
but then the check for vector type would be duplicated with its callers,
and also the purpose of vector_targets_convertible_p would become
Where vector_types_convertible returns true, a conversion might still be
needed to make the types match.
vector_types_compatible_elements_p was supposed to be a minimal change
from same_scalar_type_ignoring_signedness to fix the treatment of
opaque vectors in binary operators. Where it returns true, and
the other checks of the caller succeed (being vector types in he first
place, and matching number of elements), we can just treat the types
as essentially the same.
Your earlier patch is OK if you add this information to the comments for
the various functions and have them mention each other.