Test code looks like:
static final VectorSpecies<Byte> SPECIES = ByteVector.SPECIES_128;
public static int iarr[];
public static byte barr1[];
public static byte barr2[];
public static void shiftZero() {
for (int i = 0; i < barr1.length; i += SPECIES.length()) {
ByteVector vb = ByteVector.fromArray(SPECIES, barr1, i);
vb.lanewise(VectorOperators.ASHR, 0).intoArray(barr2, i);
}
}
https://github.com/openjdk/jdk/pull/2472 fixed the encoding problem but remains a redundant mov.
// generated code from above test case.
0x0000ffffb1115164: add x17, x12, x14
0x0000ffffb1115168: ldr q16, [x17, #16]
0x0000ffffb111516c: mov v16.16b, v16.16b // redundant?
0x0000ffffb1115170: add x14, x13, x14
0x0000ffffb1115174: str q16, [x14, #16]
static final VectorSpecies<Byte> SPECIES = ByteVector.SPECIES_128;
public static int iarr[];
public static byte barr1[];
public static byte barr2[];
public static void shiftZero() {
for (int i = 0; i < barr1.length; i += SPECIES.length()) {
ByteVector vb = ByteVector.fromArray(SPECIES, barr1, i);
vb.lanewise(VectorOperators.ASHR, 0).intoArray(barr2, i);
}
}
https://github.com/openjdk/jdk/pull/2472 fixed the encoding problem but remains a redundant mov.
// generated code from above test case.
0x0000ffffb1115164: add x17, x12, x14
0x0000ffffb1115168: ldr q16, [x17, #16]
0x0000ffffb111516c: mov v16.16b, v16.16b // redundant?
0x0000ffffb1115170: add x14, x13, x14
0x0000ffffb1115174: str q16, [x14, #16]