RFR: 8257575: C2: "failed: only phis" assert failure in loop strip mining verfication
Roland Westrelin
roland at openjdk.java.net
Wed Dec 2 08:23:03 UTC 2020
The loop in the test is a counted loop with a load pinned on the
backedge. The loop is strip mined. When the outer loop is expanded, it
ends up with a load on the backedge too as it must mirror the inner
loop. The load is input to a Phi. After expansion, the load on the
backedge of the outer loop is found to be rendundant with a dominating
load. That causes the Phi to be eliminated. The load on the backedge
of the inner loop is not eliminated. As a result, verification code
finds the inner and outer loops to have a different number of Phis
which is unexpected.
The load on the backedge of the inner loop could be eliminated. It's
not because it's not enqueued to be processed by the IGVN after loop
strip mining expansion. But beyond this immediate problem, because
IGVN processes each load separately, I think it's possible that it
succeeds in eliminating one of the loads but not the other (the graph
could have changed too much in the meantime). Because of that concern
and because it's a corner case, I think the most robust fix is to
relax the assert.
-------------
Commit messages:
- fix & test
Changes: https://git.openjdk.java.net/jdk/pull/1555/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1555&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257575
Stats: 175 lines in 2 files changed: 174 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/1555.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1555/head:pull/1555
PR: https://git.openjdk.java.net/jdk/pull/1555
More information about the hotspot-compiler-dev
mailing list