-
Enhancement
-
Resolution: Unresolved
-
P4
-
21
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