RFR: 8330247: C2: CTW fail with assert(adr_t->is_known_instance_field()) failed: instance required

Cesar Soares Lucas cslucas at openjdk.org
Fri Apr 19 00:40:19 UTC 2024


The logic in reduce allocation merges (RAM) makes use of `PhaseMacroExpand:;can_eliminate_allocation` to check whether an allocation can be scalar replaced. However, we can only SR allocations of exact types - due to rematerialization logic.

The scalar replacement logic not related to RAM has this check in `split_unique_types` so there is no performance regression by adding this check here.

Tested on Linux x64 tiers1-3.

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

Commit messages:
 - SR allocate needs to be of exact type.

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

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


More information about the hotspot-compiler-dev mailing list