RFR: 8376220: C2: Refactor the logic to in MemNode::find_previous_store [v5]
Quan Anh Mai
qamai at openjdk.org
Sat Jan 31 15:36:02 UTC 2026
On Mon, 26 Jan 2026 15:35:54 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> Thanks for accompanying this changeset with some test cases! Could you add a few negative ones where the memory accesses cannot be folded (e.g. one where c1 and c2 in TestFindStore.java are of the exact same class,
Done, I have added test for multiple cases that this method exercises. Do you think that is sufficient.
> one that exercises the raw-to-oop casting you mention above
`MemNode::find_previous_store` does not uncast its operands, so it should not encounter such cases, but there are other users of this method do that, which may result in comparing the `Proj` of an `AllocateNode` with an oop. If you remove the condition that both are oops then the JVM fails tier 1 a lot (or even fails to be built).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29390#discussion_r2749680824
More information about the hotspot-compiler-dev
mailing list