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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8)));
void bar (int8x8_t *, int8x8_t, int8x8_t);

void
foo (int8x8_t z, int8x8_t x, int8x8_t v)
{
  bar (&v, z, x);
}

ICEs too with these options and so does:
typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8)));
void bar (int8x8_t, int8x8_t);

void
foo (int8x8_t x, int8x8_t y)
{
  bar (y, x);
}

The last one works with x, y because the *neon_movv8qi instructions are
eliminated by fwprop1.

In any case, this looks like a target bug to me, there is nothing wrong in how
the expansion works here, saving hard registers in which the parameters are
passed into pseudos and then loading the hard registers in which callee expects
parameters from the pseudos is the usual thing.  If the *neon_movv8qi
instructions need -mfloat-abi=hard or whatever else, then guess
__builtin_neon_qi vectors can't be passed where gcc wants to pass them unless
that condition is met - if there are no instructions to move those data from/to
these registers or to/from memory, then those registers can't be really used
period.  Or just error if user does this?

Reply via email to