RFR: 8263303: C2 compilation fails with assert(found_sfpt) failed: no node in loop that's not input to safepoint

Roland Westrelin roland at openjdk.java.net
Tue Jun 1 08:38:37 UTC 2021


The loop strip mining verification code catches a node which is pinned
in the outer strip mined loop but not referenced from the safepoint
node.

The test case is an example of how this could happen. The array[i]
load is referenced from the safepoint initially through:

(j - 10) * array[i]

It is sunk out of the inner loop and pinned in the outer loop. A
following loop opts round causes j - 10 to constant fold to 0 and as a
consequence the array load is no longer referenced from the safepoint
but pinned in the outer strip mined loop.

I tried to find a way to preserve the invariant that all nodes in the
outer strip mined loop are referenced from the safepoint but found no
robust way for that. So the fix removes that part of the verification
code.

This requires loop cloning code to be adjusted for nodes pinned in the
outer strip mined loop but not referenced from the safepoint.

-------------

Commit messages:
 - test
 - fix

Changes: https://git.openjdk.java.net/jdk/pull/4278/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4278&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263303
  Stats: 105 lines in 3 files changed: 76 ins; 28 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4278.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4278/head:pull/4278

PR: https://git.openjdk.java.net/jdk/pull/4278


More information about the hotspot-compiler-dev mailing list