[lworld] RFR: 8275276: [lworld] C2 compilation fails with assert "adr_type for memory phis only"

Tobias Hartmann thartmann at openjdk.java.net
Thu Oct 14 11:09:25 UTC 2021


`PhiNode::verify_adr_type` fails with an assert because the phi has `Type::MEMORY` but `_adr_type` is not set. The phi is created when pushing bool/cmp pairs through a Phi in `PhaseIdealLoop::clone_iff` for Loop Unswitching:

![Screenshot from 2021-10-14 12-58-37](https://user-images.githubusercontent.com/5312595/137304712-c1450fbf-dcf9-4d83-a5f6-36db8abb1c09.png)

Is converted to:

![Screenshot from 2021-10-14 12-59-00](https://user-images.githubusercontent.com/5312595/137304754-f686d862-4be4-4438-9d10-c7c6bca95f89.png)

The code does not correctly handle `FlatArrayCheckNodes` which have a memory input as left input. The fix is to properly set the `_adr_type` in that case.

Best regards,
Tobias

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

Commit messages:
 - 8275276: [lworld] C2 compilation fails with assert "adr_type for memory phis only"

Changes: https://git.openjdk.java.net/valhalla/pull/564/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=564&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275276
  Stats: 75 lines in 2 files changed: 73 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/564.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/564/head:pull/564

PR: https://git.openjdk.java.net/valhalla/pull/564



More information about the valhalla-dev mailing list