[PATCH] middle-end/94301 - map V1x to x when the vector mode is not available

Richard Biener rguenther@suse.de
Tue Sep 1 11:52:21 GMT 2020


On Tue, 1 Sep 2020, Jakub Jelinek wrote:

> On Tue, Sep 01, 2020 at 11:50:32AM +0200, Richard Biener wrote:
> > While IMHO it makes very much sense to map V1{S,D,T}F types
> > to {S,D,T}Fmode if there's no special vector mode for it the
> > question is whether we can make this "change" for the sake
> > of the ABIs?  The alternative is to make vector lowering
> > adjust this, inserting V_C_Es for example.
> 
> I'd fear about the ABI consequences, as well as anything in the FEs and
> middle-end that cares about vector modes, so I think lowering this in
> tree-vect-generic.c using V_C_Es looks much safer to me.

OK, I'll see to do that (or fixup the RTL expansion side somehow).

Note that clang and gcc disagree about the return value ABI for

typedef double v1df __attribute__((vector_size(8)));

v1df foo (v1df x)
{
  return x;
}

where clang returns in %xmm0 while we return by invisible reference.
The argument is passed the same (via stack).  IIRC we've long said
the backends should look at the types, not the modes when deciding
how to pass / return things ...

Richard.


More information about the Gcc-patches mailing list