-
Bug
-
Resolution: Fixed
-
P3
-
repo-valhalla
jtreg -javaoption:-XX:+EnableValhallaC1 -javaoption:-XX:TieredStopAtLevel=1 Ifacmp.java
http://hg.openjdk.java.net/valhalla/valhalla/file/2b098533f1e5/test/hotspot/jtreg/runtime/valhalla/valuetypes/Ifacmp.java
The following test case fails:
public void testLocalValues() {
// "aload + ifacmp" should be same as "aaload + ifamcp"
// but let's be paranoid...
MyValue a = new MyValue(11);
MyValue b = new MyValue(11);
MyValue c = a;
MyValue a1 = new MyValue(7);
MyValue2 a2 = new MyValue2(13);
if (acmpModeInlineAlwaysFalse) {
if (a == b) throw new RuntimeException("Always false fail " + a + " == " + b);
if (a == c) throw new RuntimeException("Always false fail " + a + " == " + c);
} else {
FAIL>> if (a != b) throw new RuntimeException("Substitutability test failed" + a + " != " + b);
if (a != c) throw new RuntimeException("Substitutability test failed");
}
if (a == a1) throw new RuntimeException();
checkEqual(a, a2, false);
}
http://hg.openjdk.java.net/valhalla/valhalla/file/2b098533f1e5/test/hotspot/jtreg/runtime/valhalla/valuetypes/Ifacmp.java
The following test case fails:
public void testLocalValues() {
// "aload + ifacmp" should be same as "aaload + ifamcp"
// but let's be paranoid...
MyValue a = new MyValue(11);
MyValue b = new MyValue(11);
MyValue c = a;
MyValue a1 = new MyValue(7);
MyValue2 a2 = new MyValue2(13);
if (acmpModeInlineAlwaysFalse) {
if (a == b) throw new RuntimeException("Always false fail " + a + " == " + b);
if (a == c) throw new RuntimeException("Always false fail " + a + " == " + c);
} else {
FAIL>> if (a != b) throw new RuntimeException("Substitutability test failed" + a + " != " + b);
if (a != c) throw new RuntimeException("Substitutability test failed");
}
if (a == a1) throw new RuntimeException();
checkEqual(a, a2, false);
}