[lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses

Frederic Parain fparain at openjdk.java.net
Mon Feb 22 15:08:59 UTC 2021


On Mon, 22 Feb 2021 14:06:35 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account.
> 
> Best regards,
> Tobias

Hi Tobias,

Thank you for fixing this.
However, the fix seems to have an issue. The hash_inline_access() method encapsulates the additional offset from the delayed access into a hash value, this encapsulation prevents the is_equal(Value v) method (from the the HASHING macro) to see all individual arguments of the hash function and could cause the method return an incorrect result.

Fred

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

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


More information about the valhalla-dev mailing list