RFR: 8286941: Add mask IR for partial vector operations for ARM SVE [v3]

Xiaohong Gong xgong at openjdk.org
Mon Jun 20 01:24:03 UTC 2022


On Thu, 16 Jun 2022 09:12:09 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Xiaohong Gong has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>> 
>>  - Address review comments, revert changes for gatherL/scatterL rules
>>  - Merge branch 'jdk:master' into JDK-8286941
>>  - Revert transformation from MaskAll to VectorMaskGen, address review comments
>>  - 8286941: Add mask IR for partial vector operations for ARM SVE
>
> src/hotspot/share/opto/vectornode.cpp line 1013:
> 
>> 1011:     }
>> 1012:   }
>> 1013:   return LoadVectorNode::Ideal(phase, can_reshape);
> 
> These predicated nodes are concrete ones with fixed species and carry user specified mask, I am not clear why do we need a mask re-computation for predicated nodes.  
> 
> Higher lanes of predicated operand should already be zero and mask attached to predicated node should be correct by construction, since mask lane count is always equal to vector lane count.

Actually we don't need to add an additional mask for these masked nodes for SVE. Please refer to the `partial_op_sve_needed` method in `aarch64_sve.ad`, which lists all the ops that needs this transformation. Thanks! `LoadVectorNode::Ideal(phase, can_reshape)` just because `LoadVectorMaskedNode` derived from `LoadVectorNode`, that it may derive its other transformations in future or for other platforms.

> src/hotspot/share/opto/vectornode.cpp line 1033:
> 
>> 1031:     }
>> 1032:   }
>> 1033:   return StoreVectorNode::Ideal(phase, can_reshape);
> 
> Same as above.

Same as `LoadVectorMaskedNode`, `StoreVectorMaskedNode` doesn't need the transformation as well.

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

PR: https://git.openjdk.org/jdk/pull/9037


More information about the hotspot-compiler-dev mailing list