--- old/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java 2017-02-06 13:28:15.356387459 +0100 +++ new/test/compiler/valhalla/valuetypes/ValueTypeTestBench.java 2017-02-06 13:28:15.288387462 +0100 @@ -100,11 +100,27 @@ return __Make MyValue1(x, y, MyValue2.createInline(x, true), MyValue2.createInline(x, false), ValueTypeTestBench.rI); } + @DontInline + __ValueFactory static MyValue1 createDefaultDontInline() { + return __MakeDefault MyValue1(); + } + @ForceInline __ValueFactory static MyValue1 createDefaultInline() { return __MakeDefault MyValue1(); } + @DontInline + static MyValue1 createWithFieldsDontInline(int x, long y) { + MyValue1 v = createDefaultInline(); + v = setX(v, x); + v = setY(v, y); + v = setV1(v, MyValue2.createWithFieldsInline(x, x < y)); + v = setV2(v, MyValue2.createWithFieldsInline(x, x > y)); + v = setC(v, ValueTypeTestBench.rI); + return v; + } + @ForceInline static MyValue1 createWithFieldsInline(int x, long y) { MyValue1 v = createDefaultInline(); @@ -191,7 +207,7 @@ } @ForceInline - __ValueFactory public static MyValue2 createDefaultInline() { + __ValueFactory public static MyValue2 createDefaultInline() { return __MakeDefault MyValue2(); } @@ -1210,7 +1226,7 @@ } // test vdefault - @Test(failOn = ALLOC + STORE + TRAP) + @Test(failOn = ALLOC + LOAD + STORE + LOOP + TRAP) public long test50() { MyValue2 v = MyValue2.createDefaultInline(); return v.hash(); @@ -1222,20 +1238,22 @@ Asserts.assertEQ(result, MyValue2.createDefaultInline().hash()); } - @Test(failOn = ALLOC + STORE + TRAP) + // test vdefault + @Test(failOn = ALLOC + STORE + LOOP + TRAP) public long test51() { - MyValue1 v = MyValue1.createDefaultInline(); - return v.hash(); + MyValue1 v1 = MyValue1.createDefaultInline(); + MyValue1 v2 = MyValue1.createDefaultDontInline(); + return v1.hash() + v2.hash(); } @DontCompile public void test51_verifier(boolean warmup) { long result = test51(); - Asserts.assertEQ(result, MyValue1.createDefaultInline().hash()); + Asserts.assertEQ(result, 2 * MyValue1.createDefaultInline().hash()); } // test vwithfield - @Test(failOn = ALLOC + LOAD + STORE + TRAP) + @Test(failOn = ALLOC + LOAD + STORE + LOOP + TRAP) public long test52() { MyValue2 v = MyValue2.createWithFieldsInline(rI, true); return v.hash(); @@ -1248,16 +1266,17 @@ } // test vwithfield - @Test(failOn = ALLOC + LOAD + STORE + TRAP) + @Test(failOn = ALLOC + STORE + LOOP + TRAP) public long test53() { - MyValue1 v = MyValue1.createWithFieldsInline(rI, rL); - return v.hash(); + MyValue1 v1 = MyValue1.createWithFieldsInline(rI, rL); + MyValue1 v2 = MyValue1.createWithFieldsDontInline(rI, rL); + return v1.hash() + v2.hash(); } @DontCompile public void test53_verifier(boolean warmup) { long result = test53(); - Asserts.assertEQ(result, hash()); + Asserts.assertEQ(result, 2 * hash()); } // multi-dimensional arrays