On Thu, 3 Jun 2021 02:27:35 GMT, Xiaohong Gong <xg...@openjdk.org> wrote:

>> The Vector API toShuffle method can be optimized  using existing vector 
>> conversion intrinsic.
>> 
>> The following changes are made:
>> 1) vector.toShuffle java implementation is changed to call 
>> VectorSupport.convert.
>> 2) The conversion intrinsic (inline_vector_convert()) in 
>> vectorIntrinsics.cpp is changed to allow shuffle as a destination type.
>> 3) The shuffle.toVector intrinsic (inline_vector_shuffle_to_vector()) in 
>> vectorIntrinsics.cpp now explicitly generates conversion node instead of 
>> performing conversion during unbox. This is to remove unnecessary boxing 
>> during back to back vector.toShuffle and shuffle.toVector calls. 
>> 
>> Best Regards,
>> Sandhya
>
> src/hotspot/share/opto/vectornode.cpp line 1246:
> 
>> 1244:           return new VectorLoadMaskNode(value, out_vt);
>> 1245:         } else if (is_vector_shuffle) {
>> 1246:           if (!is_shuffle_to_vector()) {
> 
> Hi @sviswa7 , thanks for this change! I'm just curious whether 
> `is_shuffle_to_vector()` is still needed for `VectorUnboxNode` with this 
> change? It seems this flag can be removed, doesn't it?

@XiaohongGong is_shuffle_to_vector is still needed as we shouldn't generate 
VectorLoadShuffleNode for shuffle.toVector.

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

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

Reply via email to