On Tue, 1 Sep 2020, Jakub Jelinek via Gcc-patches 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.
Doesn't gcc violate the x86_64 ABI document by passing V1* vectors on the
stack? Clang seems to go half-way (arguments on the stack but return in
register), which is strange as well.
I think those vectors are relatively rare and breaking the ABI for them
may be doable, but that's not based on any actual data.
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.
If they weren't so rare, we could consider lowering them earlier so they
benefit from more optimizations, but that doesn't seem worth the trouble.
--
Marc Glisse