RFR: 8309893: Integrate ReplicateB/S/I/L/F/D nodes to Replicate node [v2]

Emanuel Peter epeter at openjdk.org
Thu Nov 2 16:51:06 UTC 2023


On Tue, 31 Oct 2023 11:04:43 GMT, Eric Liu <eliu at openjdk.org> wrote:

>> src/hotspot/share/opto/vectornode.cpp line 609:
>> 
>>> 607: // Check if input is loop invariant vector.
>>> 608: bool VectorNode::is_invariant_vector(Node* n) {
>>> 609:   // Only Replicate vector nodes are loop invariant for now.
>> 
>> Random discovery: does this not sound fishy? Can Replicate nodes never be used in a loop variant way? For example with the VectorAPI?
>
> Replicate can be variant in Vector API. E.g., we can create an IntVector in loop by IntVector.broadcast (https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java). We also have such matching rules supporting register as Replicate input.
> 
> I only find the use point of this method in Superword, I'm not sure if auto-vectorization has any special handle in vectorizing Replicate.

@e1iu what do you think?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14830#discussion_r1380462269


More information about the hotspot-compiler-dev mailing list