RFR: 8352681: C2 compilation hits asserts "must set the initial type just once" [v2]

Cesar Soares Lucas cslucas at openjdk.org
Mon Apr 7 16:54:47 UTC 2025


> The reason for the error reported is that when RAM tries to reduce a field load through a Phi it ends up calling `step_through_mergemem` with `_delay_transform` set to true and, since `step_through_mergemem` assumes that `_delay_transform` is `false`, it calls `igvn->transform` passing a MergeMem that has been added to the graph long ago.
> 
> I didn't opt to make `_delay_transform` false during the RAM transformations because that seemed to be a risky move, nevertheless I'll create an RFE and keep investigating that option.
> 
> Also, while working on a test case I found that C2 doesn't remove (at least not before EA steps) the `if (param != param) {...}` and I'm going to investigate that as a separate RFE.
> 
> I tested this with JTREG Tier 1-3 on Linux x86_64.

Cesar Soares Lucas has updated the pull request incrementally with one additional commit since the last revision:

  Fix typo & test

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24471/files
  - new: https://git.openjdk.org/jdk/pull/24471/files/d6a2ad0a..fa6b678e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24471&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24471&range=00-01

  Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24471.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24471/head:pull/24471

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


More information about the hotspot-compiler-dev mailing list