https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96895

            Bug ID: 96895
           Summary: ABI of returning V1DF differs between GCC and clang
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

clang and GCC differ in returning v1df:

typedef double v1df __attribute__((vector_size(8)));
v1df foo (v1df x)
{
  return x;
}

clang returns in %xmm0 while GCC returns by invisible reference (thus in
memory).
v1df arguments are passed on the stack with both compilers.

GCC behaves this way because the v1df type has BLKmode.  If we assign
the type DFmode (V1DFmode is unavailable) then GCC passes and returns in %xmm0.
The target should likely not work on modes here but on types.

Reply via email to