static ByteVector vecb = ByteVector.broadcast(ByteVector.SPECIES_512, 1);
public static long byteLt16() {
return vecb.lane(1);
}
0x0000fffe9cc36880: movi v16.16b, #0x1
0x0000fffe9cc36884: smov x11, v16.b[1]
0x0000fffe9cc36888: sxtb w10, w11
0x0000fffe9cc3688c: sxtw x0, w10
The final code has a redundant sxtb, which generated from (RShiftI (LShiftI src lshift_count) rshift_count). This shift pair seems to act the same role which ConvI2L does.
The wrong initial type of ExtractB causes this issue (https://github.com/openjdk/jdk/blob/dbf0905ff4ad6c831095278fc47c3a6354fe3bc1/src/hotspot/share/opto/vectornode.hpp#L1265 ).
public static long byteLt16() {
return vecb.lane(1);
}
0x0000fffe9cc36880: movi v16.16b, #0x1
0x0000fffe9cc36884: smov x11, v16.b[1]
0x0000fffe9cc36888: sxtb w10, w11
0x0000fffe9cc3688c: sxtw x0, w10
The final code has a redundant sxtb, which generated from (RShiftI (LShiftI src lshift_count) rshift_count). This shift pair seems to act the same role which ConvI2L does.
The wrong initial type of ExtractB causes this issue (https://github.com/openjdk/jdk/blob/dbf0905ff4ad6c831095278fc47c3a6354fe3bc1/src/hotspot/share/opto/vectornode.hpp#L1265 ).
- is blocked by
-
JDK-8303508 Vector.lane() gets wrong value on x86
- Resolved