[jdk18] RFR: 8278267: ARM32: several vector test failures for ASHR [v3]

Hao Sun haosun at openjdk.java.net
Tue Jan 4 04:22:28 UTC 2022


On Mon, 3 Jan 2022 22:42:14 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Hao Sun has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make minimal updates to exisiting rules
>>   
>>   1. logical left shift rules
>>   a). add is_var_shift check for vslAA_immI rules.
>>   b). for vslAA_reg rules, remove the matching for URShiftV cases as we
>>   have the separate logical right shift rules now.
>>   
>>   2. logical right shift rules
>>   a). add vsrlAA_reg and vsrlAA_reg_var rules.
>>   b). add is_var_shift check for vsrlAA_immI rules.
>>   
>>   3. arithmetic right shift rules
>>   a). add is_var_shift check for vsraAA_reg rules.
>>   b). add vsraAA_reg_var rules
>>   c). for vsraAA_immI rules, add is_var_shift check and update the match
>>   primitive.
>>   
>>   Code style issues(FIXME and the surrounding space in ins_pipe):
>>   1. for modified rules, keep it as it was
>>   2. for newly added rules, update the style
>
> src/hotspot/share/opto/vectornode.hpp line 546:
> 
>> 544:   virtual bool cmp(const Node& n) const {
>> 545:     return VectorNode::cmp(n) && _is_var_shift == ((ShiftVNode&)n)._is_var_shift;
>> 546:   }
> 
> Is it important to add hash() and cmp()?

I think it's safe to add them to avoid mis-optimizations at IR level.

Per my understanding, two ShiftV nodes with the same vector elements but with different `_is_var_shift` field values, are two different nodes, and they cannot be merged/treated as the same node.

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

PR: https://git.openjdk.java.net/jdk18/pull/41


More information about the hotspot-compiler-dev mailing list