[14] RFR(S): 8229016: C2 scalarization crashes with assert(node->Opcode() == Op_CastP2X) failed: ConvP2XNode required

Tobias Hartmann tobias.hartmann at oracle.com
Mon Aug 5 13:48:46 UTC 2019


please review the following patch:

When processing safepoint uses of a non-escaping array allocation during scalar replacement, we try
to determine array element values from memory. In this case, a copy to the array is replaced by
individual loads from the source [1]. Because the array copy has src == dst, we end up adding new
loads from the to-be-eliminated array which confuses/crashes the following removal code.

We should detect this case and try to determine the value from memory instead of adding a new load.


[1] see PhaseMacroExpand::scalar_replacement -> PhaseMacroExpand::value_from_mem ->

More information about the hotspot-compiler-dev mailing list