target/arm: Fix sve_punpk_p vs odd vector lengths

Wrote too much with punpk1 with vl % 512 != 0.

Backports fd911a21414b5a17663fa2b97f1059fb11cee99d
This commit is contained in:
Richard Henderson 2021-03-30 14:32:42 -04:00 committed by Lioncash
parent 78c016ef83
commit e7cec52fac

View file

@ -2104,11 +2104,11 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t pred_desc)
high = oprsz >> 1; high = oprsz >> 1;
} }
if ((high & 3) == 0) { if ((oprsz & 7) == 0) {
uint32_t *n = vn; uint32_t *n = vn;
high >>= 2; high >>= 2;
for (i = 0; i < DIV_ROUND_UP(oprsz, 8); i++) { for (i = 0; i < oprsz / 8; i++) {
uint64_t nn = n[H4(high + i)]; uint64_t nn = n[H4(high + i)];
d[i] = expand_bits(nn, 0); d[i] = expand_bits(nn, 0);
} }