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

Eric Liu eliu at openjdk.org
Tue Oct 24 07:56:34 UTC 2023


On Fri, 20 Oct 2023 06:30:29 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Eric Liu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - small fix
>>    
>>    Change-Id: I121a8c1ad75e88c0af41f2c1ef00289a3d61f400
>>  - Merge jdk:master
>>    
>>    Change-Id: I4df10ba7290e9af02deeac5a931234a07be7c207
>>  - 8309893: Integrate ReplicateB/S/I/L/F/D nodes to Replicate node
>>    
>>    This patch creates ReplicateNode to replace ReplicateB/S/I/L/F/DNode,
>>    like other vector nodes introduced recently, e.g., PopulateIndexNode and
>>    ReverseVNode, etc. This refers from:
>>    https://mail.openjdk.org/pipermail/panama-dev/2020-April/008484.html
>>    
>>    After merging these nodes, code will be easier to maintain. E.g.,
>>    matching rules can be simplified.
>>    
>>    Besides AArch64, this patch tries to keep other ad files as the same
>>    before, only supplies some necessary predicate. E.g., for matching rules
>>    using ReplicateB before, they are now matching Replicate with a new
>>    predicate "Matcher::vector_element_basic_type(n) == T_BYTE". This would
>>    be easy for review and lower risks.
>>    
>>    [TEST]
>>    x86:     Tested with option "-XX:UseAVX=0/1/2/3".
>>    AArch64: Tested on SVE machine and Neon machine.
>>    
>>    Full jtreg passed without new issue.
>>    
>>    Change-Id: Icb16084e3909177ab302f0ba33c2216c860a5da6
>
> src/hotspot/share/opto/vectornode.hpp line 1129:
> 
>> 1127:   ReplicateNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {
>> 1128:     assert(vt->element_basic_type() != T_BOOLEAN, "not support");
>> 1129:     assert(vt->element_basic_type() != T_CHAR, "not support");
> 
> If you want to test the types here, then you should probably test also for `is_java_primitive(BasicType t)`. You probably wanted to exclude object pointers etc as well.

TypeVect is created from TypeVector::make(), in there `is_java_primitive(BasicType t)` has been checked.  Currently we didn't find ReplicateNode which element type is boolean or char in real cases.

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

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


More information about the hotspot-compiler-dev mailing list