public class TestEliminatedCastPP {
static TestEliminatedCastPP saved;
static TestEliminatedCastPP saved_not_null;
int f;
static int test(TestEliminatedCastPP obj, int[] array, boolean flag) {
int ret = array[0] + array[20];
saved = obj;
if (obj == null) {
return ret;
}
saved_not_null = obj;
int i = 0;
for (; i < 10; i++);
ret += array[i];
TestEliminatedCastPP res;
if (flag) {
res = saved;
} else {
res = saved_not_null;
}
return ret + res.f;
}
static public void main(String[] args) {
int[] array = new int[100];
TestEliminatedCastPP obj = new TestEliminatedCastPP();
for (int i = 0; i < 20000; i++) {
test(obj, array, (i%2) == 0);
}
test(null, array, true);
}
}
Crashes on sparc with:
-XX:+StressGCM
ILW=H(crash)L(never seen in the wild, requires stress option)H(none)=P2
- relates to
-
JDK-8303737 C2: Load can bypass subtype check that enforces it's from the right object type
- Resolved
-
JDK-8146999 hotspot/test/compiler/c2/8007294/Test8007294.java test nightly failure
- Resolved
-
JDK-8287009 Useless CastPPs added by PhiNode::Ideal optimization
- Open
-
JDK-8331536 -XX:+StressGCM caused fatal error
- Open
-
JDK-8179882 C2: Stale control info after cast node elimination during loop optimization pass
- Resolved
-
JDK-8181741 C2 compilation fails with "assert(i<_max) failed: oob"
- Resolved
-
JDK-8150804 C2 Compilation fails with assert(_base >= OopPtr && _base <= AryPtr) failed: Not a Java pointer
- Resolved
-
JDK-8153357 C2 creates incorrect cast after eliminating phi with unique input
- Resolved
-
JDK-8238765 PhaseCFG::schedule_pinned_nodes cannot handle precedence edges from unmatched CFG nodes correctly
- Resolved
-
JDK-8304049 C2 can not merge trivial Ifs due to CastII
- Open