Currently, VectorShuffle is stored as a byte array, and would be expanded upon usage. This poses several drawbacks:
1, Inefficient conversions between a shuffle and its corresponding vector. This hinders the performance when the shuffle indices are not constant and are loaded or computed dynamically.
2, Redundant expansions in rearrange operations. On all platforms, it seems that a shuffle index vector is always expanded to the correct type before executing the rearrange operations.
3, Some redundant intrinsics are needed to support this handling as well as special considerations in the C2 compiler.
4, Range checks are performed using toVector, which is inefficient for FP types since both FP conversions and FP comparisons are more expensive than the integral ones.
As a result, I propose to implement VectorShuffle as an array of the bit type (a.k.a the integral type that has the same size as the element type).
1, Inefficient conversions between a shuffle and its corresponding vector. This hinders the performance when the shuffle indices are not constant and are loaded or computed dynamically.
2, Redundant expansions in rearrange operations. On all platforms, it seems that a shuffle index vector is always expanded to the correct type before executing the rearrange operations.
3, Some redundant intrinsics are needed to support this handling as well as special considerations in the C2 compiler.
4, Range checks are performed using toVector, which is inefficient for FP types since both FP conversions and FP comparisons are more expensive than the integral ones.
As a result, I propose to implement VectorShuffle as an array of the bit type (a.k.a the integral type that has the same size as the element type).
- is cloned by
-
JDK-8310691 [REDO] [vectorapi] Refactor VectorShuffle implementation
-
- Resolved
-
- relates to
-
JDK-8306592 jdk/incubator/vector/ShortMaxVectorTests.java intermittently fails after JDK-8304450 on x86_32
-
- In Progress
-
-
JDK-8306008 Several Vector API tests fail for client VM after JDK-8304450
-
- Closed
-
-
JDK-8310459 [BACKOUT] 8304450: [vectorapi] Refactor VectorShuffle implementation
-
- Resolved
-
-
JDK-8309531 Incorrect result with unwrapped iotaShuffle.
-
- Resolved
-
-
JDK-8309373 Performance drop in Vector-API based kernel with JDK-21
-
- Closed
-
(1 relates to, 2 links to)