RFR: 8316361: C2: assert(!failure) failed: Missed optimization opportunity in PhaseIterGVN with -XX:VerifyIterativeGVN=10

Emanuel Peter epeter at openjdk.org
Fri Sep 22 13:11:36 UTC 2023


This seems to be related to [JDK-8298176](https://bugs.openjdk.org/browse/JDK-8298176) / https://github.com/openjdk/jdk20/pull/65
This change allows `OpaqueZeroTripGuard -> CmpI` to fold in some cases. We have also added code to notify the `CmpI` during IGVN, so it can potentially change its type/constant fold:
https://github.com/openjdk/jdk/blob/a0a09d56ba4fc6133b423ad29d86fc99dd6dc19b/src/hotspot/share/opto/phaseX.cpp#L1681-L1687

However, when we hack the input to the `opaq` node, we must call `_igvn.add_users_to_worklist` to trigger this notification. I added this missing part.

Running Tier1-6 and stress testing...

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

Commit messages:
 - 8316361: first commit

Changes: https://git.openjdk.org/jdk/pull/15886/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15886&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8316361
  Stats: 50 lines in 2 files changed: 50 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/15886.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15886/head:pull/15886

PR: https://git.openjdk.org/jdk/pull/15886


More information about the hotspot-compiler-dev mailing list