RFR: 8352963: [REDO] Missing late inline cleanup causes compiler/vectorapi/VectorLogicalOpIdentityTest.java IR failure

Damon Fenacci dfenacci at openjdk.org
Thu Apr 3 14:10:34 UTC 2025


This PR is a REDO of [JDK-8302459](https://bugs.openjdk.org/browse/JDK-8302459) ([PR](https://github.com/openjdk/jdk/pull/21682), [backout](https://bugs.openjdk.org/browse/JDK-8352965) triggered by a failing internal test).

There was an issue with `CallGenerator::for_method_handle_call` that could delay late inlining by creating a "generic" `LateInlineCallGenerator` instead of a more specific `LateInlineMHCallGenerator`:
https://github.com/openjdk/jdk/blob/74df384a9870431efb184158bba032c79c35356e/src/hotspot/share/opto/callGenerator.cpp#L991
While running IGVN this could be misinterpreted as non-MH late-inline
https://github.com/openjdk/jdk/blob/c282fb9add32f1fac8174ca84b1b68a869d2578d/src/hotspot/share/opto/callnode.cpp#L1088-L1091
eventually triggering `assert(!cg->method()->is_method_handle_intrinsic(), "required");`

The fix involves creating a `LateInlineMHCallGenerator` instead. Here is what changed from the backed out PR:
https://github.com/openjdk/jdk/blob/c282fb9add32f1fac8174ca84b1b68a869d2578d/src/hotspot/share/opto/callGenerator.cpp#L991-L995

### Testing

Tier 1-4 (windows-x64, linux-x64/aarch64, and macosx-x64/aarch64; release and debug mode)

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

Commit messages:
 - JDK-8352963: generate specific MH late if needed when delaying inlining
 - 8302459: Missing late inline cleanup causes compiler/vectorapi/VectorLogicalOpIdentityTest.java IR failure

Changes: https://git.openjdk.org/jdk/pull/24402/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24402&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8352963
  Stats: 104 lines in 7 files changed: 49 ins; 3 del; 52 mod
  Patch: https://git.openjdk.org/jdk/pull/24402.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24402/head:pull/24402

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


More information about the hotspot-compiler-dev mailing list