RFR: 8289604: compiler/vectorapi/VectorLogicalOpIdentityTest.java failed on x86 AVX1 system

Xiaohong Gong xgong at openjdk.org
Tue Jul 5 07:56:07 UTC 2022


The sub-test "`testMaskAndZero()`" failed on x86 systems when
`UseAVX=1` with the IR check failure:

  - counts: Graph contains wrong number of nodes:
     * Regex 1: (\\d+(\\s){2}(StoreVector.*)+(\\s){2}===.*)
        - Failed comparison: [found] 0 >= 1 [given]
        - No nodes matched!

The root cause is the `VectorMask.fromArray/intoArray` APIs
are not intrinsified when "`UseAVX=1`" for long type vectors
with following reasons:
 1) The system supported max vector size is 128 bits for
integral vector operations when "`UseAVX=1`".
 2) The match rule of `VectorLoadMaskNode/VectorStoreMaskNode`
are not supported for vectors with 2 elements (see [1]).

Note that `VectorMask.fromArray()` needs to be intrinsified
with "`LoadVector+VectorLoadMask`". And `VectorMask.intoArray()`
needs to be intrinsified with "`VectorStoreMask+StoreVector`".
Either "`VectorStoreMask`" or "`StoreVector`" not supported by the
compiler backend will forbit the relative API intrinsification.

Replacing the vector type from Long to other integral types
in the test case can fix the issue.

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L1861

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

Commit messages:
 - 8289604: compiler/vectorapi/VectorLogicalOpIdentityTest.java failed on x86 AVX1 system

Changes: https://git.openjdk.org/jdk/pull/9373/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9373&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289604
  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/9373.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9373/head:pull/9373

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


More information about the hotspot-compiler-dev mailing list