< prev index next >
test/compiler/valhalla/valuetypes/ValueTypeTestBench.java
Print this page
*** 24,33 ****
--- 24,34 ----
// TODO add bugid and summary
/*
* @test
* @library /testlibrary /test/lib /compiler/whitebox /
+ * @requires os.simpleArch == "x64"
* @build compiler.valhalla.valuetypes.ValueTypeTestBench
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main ClassFileInstaller jdk.test.lib.Platform
* @run main/othervm -ea -noverify -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UnlockExperimentalVMOptions -XX:+ValueTypePassFieldsAsArgs -XX:+ValueArrayFlatten
*** 709,737 ****
long result = test22();
Asserts.assertEQ(result, val5.hash() + val5.v3.hash());
}
// Test OSR compilation
! @Test(failOn = ALLOC + LOAD + STORE + LOOP + TRAP)
public long test23() {
MyValue1 v = MyValue1.createInline(rI, rL);
! // TODO add OSR testcase for value type arrays
! //MyValue1[] va = new MyValue1[10];
long result = 0;
// Long loop to trigger OSR compilation
! for (int i = 0 ; i < 100_000 ; ++i) {
// Reference local value type in interpreter state
! result = v.hash(); // + va[0].hash();
}
return result;
}
@DontCompile
public void test23_verifier(boolean warmup) {
- //MyValue1[] va = new MyValue1[10];
long result = test23();
! Asserts.assertEQ(result, hash() /* + va[0].hash() */);
}
// Test interpreter to compiled code with various signatures
@Test(failOn = ALLOC + STORE + TRAP)
public long test24(MyValue2 v) {
--- 710,742 ----
long result = test22();
Asserts.assertEQ(result, val5.hash() + val5.v3.hash());
}
// Test OSR compilation
! @Test()
public long test23() {
MyValue1 v = MyValue1.createInline(rI, rL);
! MyValue1[] va = new MyValue1[Math.abs(rI) % 3];
! for (int i = 0; i < va.length; ++i) {
! va[i] = MyValue1.createInline(rI, rL);
! }
long result = 0;
// Long loop to trigger OSR compilation
! for (int i = 0 ; i < 100_000; ++i) {
// Reference local value type in interpreter state
! result = v.hash();
! for (int j = 0; j < va.length; ++j) {
! result += va[j].hash();
! }
}
return result;
}
@DontCompile
public void test23_verifier(boolean warmup) {
long result = test23();
! Asserts.assertEQ(result, ((Math.abs(rI) % 3) + 1) * hash());
}
// Test interpreter to compiled code with various signatures
@Test(failOn = ALLOC + STORE + TRAP)
public long test24(MyValue2 v) {
< prev index next >