RFR: 8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes [v4]

Dong Bo dongbo at openjdk.java.net
Wed Dec 9 06:29:51 UTC 2020


On Tue, 8 Dec 2020 21:59:13 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Dong Bo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix trailing whitespace
>
> src/hotspot/share/opto/vectornode.cpp line 1186:
> 
>> 1184:   BasicType bt = vect_type()->element_basic_type();
>> 1185:   int extinfo = encode_rotate_vector_shift_type(in(2));
>> 1186:   if (!Matcher::match_rule_supported_vector(Op_RotateLeftV, vlen, bt, extinfo)) {
> 
> I don't see much value in encoding and packing node-specific info in an int. Why not simply introduce a new platform-specific entry and pass a `Node*` instead letting platform-specific code to extract any useful information from it?
> 
> As an alternative, introduce a new capability (`Matcher::supports_vector_variable_rotates`) and check it in shared code (`RotateLeftVNode::Ideal`).

Introduced `Matcher::supports_vector_variable_rotates(VectorNode *n)` in the updated commit https://github.com/openjdk/jdk/pull/1532/commits/d2cb793c35f02667927acfa76a115442b1d6956d.
Verified it both on `AARCH64` and `X86_64` platforms with `fastdebug` build. Tests are good.

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

PR: https://git.openjdk.java.net/jdk/pull/1532


More information about the hotspot-compiler-dev mailing list