< prev index next >

test/hotspot/jtreg/compiler/c2/irTests/TestVectorizationMismatchedAccess.java

Print this page
*** 29,10 ***
--- 29,17 ---
  import jdk.internal.misc.Unsafe;
  import java.util.Random;
  import java.util.Arrays;
  import java.nio.ByteOrder;
  
+ // Note Lilliput:
+ // Tests test that vectorization is used to fill destination byte array if alignment allows. That works in Stock VM
+ // since for both byte[] and long[] members start at the same offset. It does not work in Lilliput, nor would it work
+ // in stock if we fix "8139457: Array bases are aligned at HeapWord granularity", since bytes start at offset 12, long
+ // at offset 16.
+ // For now I just enforce -CompactObjectHeaders.
+ 
  /*
   * @test
   * @bug 8300258
   * @key randomness
   * @requires (os.simpleArch == "x64") | (os.simpleArch == "aarch64")

*** 53,11 ***
          Object alignVector = wb.getVMFlag("AlignVector");
          if (alignVector != null && !((Boolean)alignVector)) {
              if (ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN) {
                  throw new RuntimeException("fix test that was written for a little endian platform");
              }
!             TestFramework.runWithFlags("--add-modules", "java.base", "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED");
          }
      }
  
      static int size = 1024;
      static byte[] byteArray = new byte[size * 8];
--- 60,11 ---
          Object alignVector = wb.getVMFlag("AlignVector");
          if (alignVector != null && !((Boolean)alignVector)) {
              if (ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN) {
                  throw new RuntimeException("fix test that was written for a little endian platform");
              }
!             TestFramework.runWithFlags("-XX:+UnlockExperimentalVMOptions", "-XX:-UseCompactObjectHeaders", "--add-modules", "java.base", "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED");
          }
      }
  
      static int size = 1024;
      static byte[] byteArray = new byte[size * 8];
< prev index next >