RFR: 8343747: C2: TestReplicateAtConv.java crashes with -XX:MaxVectorSize=8

Emanuel Peter epeter at openjdk.org
Tue Dec 3 16:38:40 UTC 2024


On Thu, 28 Nov 2024 15:31:47 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> Crash occurs when attempting to create a `Replicate` node that's input
> to a `VectorCast` node (for a `ConvL2I`) that's not supported by the
> platform (when run with `MaxVectorSize=8`). I think the pack for the
> `VectorCast` should be filtered out earlier as not implemented and I
> propose adding a test to `VectorCastNode::implemented()` for the type
> of its input to handle that corner case.

Looks reasonable, thanks for the fix!

I linked the issue with [JDK-8341834](https://bugs.openjdk.org/browse/JDK-8341834) on JBS - after all that had the same issue of Replicate->Cast

test/hotspot/jtreg/compiler/vectorization/TestReplicateAtConv.java line 29:

> 27:  * @summary C2 compilation fails with "bad AD file" due to Replicate
> 28:  * @run main/othervm -XX:CompileCommand=compileonly,TestReplicateAtConv::test -Xcomp TestReplicateAtConv
> 29:  * @run main/othervm -XX:CompileCommand=compileonly,TestReplicateAtConv::test -Xcomp -XX:MaxVectorSize=8 TestReplicateAtConv

You should add the new bug id to the test.

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

Changes requested by epeter (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22442#pullrequestreview-2476199710
PR Review Comment: https://git.openjdk.org/jdk/pull/22442#discussion_r1868038365


More information about the hotspot-compiler-dev mailing list