Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8141878 | emb-9 | Roland Westrelin | P4 | Resolved | Fixed | team |
From Vitaly Davidovich:
Suppose we have the following code:
private static final long[] ARR = new long[10];
private static final int ITERATIONS = 500 * 1000 * 1000;
static void loop() {
int i = ITERATIONS;
while(--i >= 0) {
ARR[4] = i;
}
}
My expectation would be that loop() effectively compiles to:
ARR[4] = 0;
ret;
However, an actual loop is compiled.
Suppose we have the following code:
private static final long[] ARR = new long[10];
private static final int ITERATIONS = 500 * 1000 * 1000;
static void loop() {
int i = ITERATIONS;
while(--i >= 0) {
ARR[4] = i;
}
}
My expectation would be that loop() effectively compiles to:
ARR[4] = 0;
ret;
However, an actual loop is compiled.
- backported by
-
JDK-8141878 Intermediate writes in a loop not eliminated by optimizer
-
- Resolved
-
- relates to
-
JDK-8136461 PhaseIdealLoop::try_move_store_before_loop() may bypass early loop exit
-
- Resolved
-
-
JDK-8136926 phi == NULL assert in PhaseIdealLoop::try_move_store_after_loop
-
- Resolved
-
-
JDK-8189067 SuperWord optimization crashes with "assert(out == prev || prev == __null) failed: no branches off of store slice"
-
- Closed
-
-
JDK-8202123 C2 Crash in Node::in(unsigned int) const+0x14
-
- Closed
-