RFR: 8259610: VectorReshapeTests are not effective due to failing to intrinsify "VectorSupport.convert" [v5]

Christian Hagedorn chagedorn at openjdk.java.net
Fri Dec 10 11:21:19 UTC 2021


On Fri, 10 Dec 2021 03:45:06 GMT, Mai Đặng Quân Anh <duke at openjdk.java.net> wrote:

>> Hi,
>> 
>> This patch adds several c2 tests for vector reshape operations. The tests verify the intrinsification of the corresponding operations by using the IR framework and verify the correctness of the results of compiled codes.
>> 
>> While working on this patch, I spot some regressions regarding compilation on AVX1.
>> 
>> Thank you very much.
>
> Mai Đặng Quân Anh has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 13 additional commits since the last revision:
> 
>  - remove imports
>  - refactor main methods
>  - Merge branch 'master' into vectorReshapeTests
>  - fix cpu pattern on Neon
>  - concretify parameter types
>  - reduce invocation count, improve test cases
>  - Merge branch 'master' into vectorReshapeTests
>  - grammar in comment
>  - missing copyright
>  - add comments
>  - ... and 3 more: https://git.openjdk.java.net/jdk/compare/b537e319...5d3b23a7

Nice IR tests! They look good.

test/hotspot/jtreg/compiler/vectorapi/reshape/tests/TestVectorDoubleExpandShrink.java line 39:

> 37: public class TestVectorDoubleExpandShrink {
> 38:     @Test
> 39:     @IR(counts = {REINTERPRET_NODE, "0"})

You could use the equivalent attribute `failOn = REINTERPRET_NODE` for a zero count instead.

test/hotspot/jtreg/compiler/vectorapi/reshape/utils/VectorReshapeHelper.java line 80:

> 78:     public static final String F2X_NODE  = PREFIX + "VectorCastF2X" + SUFFIX;
> 79:     public static final String D2X_NODE  = PREFIX + "VectorCastD2X" + SUFFIX;
> 80:     public static final String REINTERPRET_NODE = PREFIX + "VectorReinterpret" + SUFFIX;

The vector regexes for the IR matching could be moved to `compiler/lib/ir_framework/IRNode.java` to have them at a common place if other tests want to use them as well. If you move them you should add a `VECTOR_`/`VECTOR_CAST` prefix or something like that to better distinguish them from other nodes.

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

Marked as reviewed by chagedorn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6724


More information about the hotspot-compiler-dev mailing list