-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 21
-
Component/s: hotspot
This showed up with some panama benchmarks.
In the following code snippet:
public static void test2(byte[] dest, long[] src) {
for (int i = 0; i < size; i++) {
long k = Objects.checkIndex(i * 8, intLimit);
UNSAFE.putLongUnaligned(dest, UNSAFE.ARRAY_BYTE_BASE_OFFSET + k, src[i]);
}
}
The shift for the store address computation is not folded in the adress computation of the memory access
In the following code snippet:
public static void test2(byte[] dest, long[] src) {
for (int i = 0; i < size; i++) {
long k = Objects.checkIndex(i * 8, intLimit);
UNSAFE.putLongUnaligned(dest, UNSAFE.ARRAY_BYTE_BASE_OFFSET + k, src[i]);
}
}
The shift for the store address computation is not folded in the adress computation of the memory access