Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8300262

C2: generated code from Memory segment API could better use addressing modes

XMLWordPrintable

      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

            roland Roland Westrelin
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: