RFR: 8310691: [REDO] [vectorapi] Refactor VectorShuffle implementation [v6]

Quan Anh Mai qamai at openjdk.org
Mon Dec 9 13:33:12 UTC 2024


On Mon, 9 Dec 2024 08:10:20 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add comment, extract cast into local variable
>
> src/hotspot/share/opto/vectornode.hpp line 1696:
> 
>> 1694: // shuffle vector into 1 that we can do byte rearrange such that it would provide the same result.
>> 1695: // This can be done in VectorRearrangeNode during code emission but we eagerly expand out this
>> 1696: // because it is often the case that an index vector is reused in many rearrange operations.
> 
> Thanks for this explanation!
> 
> `This can be done in VectorRearrangeNode` -> **could have** be done, because we now don't do it, right?
> What do you mean by `expand out this`? Do you mean we have a separate dedicated node, so that it could possibly fold away with other nodes, such as index vector?

Thanks for the reviews, I have added another comment sentence. Basically, by separating into a dedicated node, the preparation of the index vector can be GVN-ed across multiple rearrange operations as well as hoisted out of loops if the index vector is a loop invariant.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21042#discussion_r1875985223


More information about the hotspot-compiler-dev mailing list