Hi, The issue is that `PhaseMacroExpand::value_from_mem_phi` does not take into consideration flat arrays, so it incorrectly returns the whole object for a load from one of its fields. This results in a byte `Phi` with an input being an `oop`, triggering the assert during `LRG::set_num_regs` because the size of a `Phi` and its input are different.
Please take a look and leave your reviews, thanks a lot. ------------- Commit messages: - Fix folding initial value from an allocation Changes: https://git.openjdk.org/valhalla/pull/1909/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1909&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8375196 Stats: 97 lines in 2 files changed: 58 ins; 29 del; 10 mod Patch: https://git.openjdk.org/valhalla/pull/1909.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1909/head:pull/1909 PR: https://git.openjdk.org/valhalla/pull/1909
