--- old/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java 2018-11-27 21:41:07.571130736 -0800 +++ new/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java 2018-11-27 21:41:07.451126140 -0800 @@ -757,4 +757,31 @@ staticVal3.verify(vt); va[0].verify(vt); } + + // Test the handling of anewarray of a VT + @Test() + public MyValue2[] test36() { + MyValue2[] va = new MyValue2[3]; + return va; + } + + @DontCompile + public void test36_verifier(boolean warmup) { + MyValue2[] va = new MyValue2[10]; + MyValue2[] result = test36(); + Asserts.assertEQ(result[2].hash(), va[0].hash()); + } + + // Test the handling of aaload from a VT array + @Test() + public MyValue2 test37(MyValue2[] array, int i) { + return array[i]; + } + + @DontCompile + public void test37_verifier(boolean warmup) { + MyValue2[] va = new MyValue2[10]; + MyValue2 result = test37(va, 9); + Asserts.assertEQ(result.hash(), va[0].hash()); + } }