This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: Re: rfc: auto-casted vector types

Aldy Hernandez <> writes:

> I have addressed everyone's suggestions.  I have also included a
> testcase.

Still not quite right on the target hook stuff:

> + @item TARGET_VECTOR_TYPES_COMPATIBLE(@var{tree1}, @var{tree2})
> + Define this macro to return nonzero if no cast is needed when copying
> + a vector value of type @var{tree1} to a vector value of type
> + @var{tree2}.

Kill this chunk entirely.

> + @deftypefn {Target Hook} bool TARGET_VECTOR_TYPES_COMPATIBLE (tree
> @var{type1}, tree @var{type2})
> + This target hook returns @code{true} if two vector types can be copied
> + without an explicit cast.
> + @end deftypefn

And incorporate its wording here:

  This target hook should return @code{true} if no cast is
  needed when copying a vector value of type @var{type1} into a
  vector lvalue of type @var{type2}.  The default is that there are no
  such types.

Except it looks, inspecting the callers, to be the other way around.
(Which probably doesn't matter, since the relations are symmetric.)

> + extern bool rs6000_spe_vector_types_compatible PARAMS ((tree, tree));

This function can and should now be made static.

> + /* Allow SPE vector types to be inter-converted.  */
> rs6000_spe_vector_types_compatible

Make this definition with the other target-hook defines, in rs6000.c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]