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

--- Comment #2 from Krister Walfridsson <kristerw at gcc dot gnu.org> ---
(In reply to Robin Dapp from comment #1)
> To be clear: We generally do the right thing.  It's just this special case
> when a vector doesn't fully fit that we don't handle properly.

I think it is wrong for all cases where we have too many arguments. The
function below places v4 in memory as if it was an aggregate larger than 2×XLEN
instead as on the stack as expected.

typedef int v4si __attribute__ ((vector_size (16)));
int test (int accumulator, int dummy, v4si v1, v4si v2, v4si v3, v4si v4)
{
  accumulator &= v4[0] & v4[1] & v4[2] & v4[3];
  return accumulator;
}

Reply via email to