[jdk19] RFR: 8287851: C2 crash: assert(t->meet(t0) == t) failed: Not monotonic

Jatin Bhateja jbhateja at openjdk.org
Sat Jul 2 18:58:13 UTC 2022


Hi All,

Patch fixes the assertion failure seen during conditional constant propagation optimization on account of
non-convergence, this happens when type values (lattice) associated with IR node seen during iterative data flow analysis are not-monotonic.

Problem was occurring due to incorrect result value range estimation by Value routines associated with Compress/ExpandBits IR nodes, non-constant mask lattice can take any value between _lo and _hi values,  special handling for +ve mask value range is using count_leading_zeros to estimate the maximum bit width needed to accommodate the result.  Since count_leading_zeros
accepts a long argument there by sign-extending integer argument, hence for integer case we need to subtract 32 from the results to get correct value.

Patch also fixes a typo resulting into a dead code reported by [JDK-8287855](https://bugs.openjdk.org/browse/JDK-8287855): Problem in compress_expand_identity.

Failing unit test java/lang/CompressExpandTest.java has been removed from ProblemList.txt.

Kindly review and share your feedback.

Best Regards,
Jatin

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

Commit messages:
 - 8287851: C2 crash: assert(t->meet(t0) == t) failed: Not monotonic

Changes: https://git.openjdk.org/jdk19/pull/104/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=104&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8287851
  Stats: 7 lines in 2 files changed: 4 ins; 2 del; 1 mod
  Patch: https://git.openjdk.org/jdk19/pull/104.diff
  Fetch: git fetch https://git.openjdk.org/jdk19 pull/104/head:pull/104

PR: https://git.openjdk.org/jdk19/pull/104


More information about the hotspot-compiler-dev mailing list