RFR: 8288204: GVN Crash: assert() failed: correct memory chain [v5]

Vladimir Kozlov kvn at openjdk.org
Fri Dec 23 17:32:52 UTC 2022


On Fri, 23 Dec 2022 17:24:44 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> `MergeMemNode::Identity()` will return base memory if there are no real merge of memories. The failed test [m14](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyAsLoadsStores.java#L181) copies 0 elements. In such case we don't generate loads/stores for forward copy. And calling `transform` on new `mm` will just return its base memory which is existing node.
> 
> I think `ArrayCopyNode::Ideal()` did not take such case into account.

In general when you return new node in some `Ideal()` method you don't call `transform()` on it. You call `transform()` on new nodes used to construct a new returned node.

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

PR: https://git.openjdk.org/jdk/pull/9777


More information about the hotspot-compiler-dev mailing list