JDK-8327465 : [lworld] C2: assert(outer->outcnt() >= phis + 2 - be_loads && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-03-06
  • Updated: 2025-04-09
  • Resolved: 2025-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaResolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
We are seeing this assertion failure with the changes of JDK-8293541. However, this seem to be an existing rare issue that is only triggered with JDK-8293541 with the following test, scenario, and additional flags:

Test: TestOnStackReplacement::test3()
Scenario:  3
Added flags: -XX:-TieredCompilation -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:MaxNodeLimit=100000 -DScenarios=3

The test was manually uncommented with JDK-8293541. This bug should fix this already existing issue.
Comments
I can no longer reproduce this but I think it's still an issue. From what I remember from looking into the issue back there, we have more Phis at the CountedLoopNode then at the OuterStripMinedLoopNode. This happens when we split some CountedLoopNode phis through merge mems but not do the same for the phis at the OuterStripMinedLoopNode. However, now that JDK-8333393 is merged into lworld, it should fix this issue because we split more phis through mergemems. We could encounter similar issues with JDK-8353717 due to a wrong merge of JDK-8333393. Once this was fixed, we could no longer observe this assert. I'm therefore closing this issue as a dup of JDK-8333393.
09-04-2025