RFR: 8283894: Intrinsify compress and expand bits on x86 [v2]

Jatin Bhateja jbhateja at openjdk.java.net
Mon May 16 15:25:58 UTC 2022


On Wed, 4 May 2022 17:59:20 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - 8283894: Review comments resolutions.
>>  - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8283894
>>  - 8283894: Extending IR framework testcase with some functional test points.
>>  - 8283894: Intrinsify compress and expand bits on x86
>
> src/hotspot/cpu/x86/x86.ad line 6191:
> 
>> 6189: %}
>> 6190: 
>> 6191: instruct compressBitsL_reg(rRegL dst, rRegL src, rRegL mask) %{
> 
> All the compress/expand rules could be moved to x86_64.ad.

DONE,  only integer patters which are common to both targets are in x86.ad, special instruction sequence has been introduced for bit extraction / compression for 32 bit targets. It shows 10x improvement over existing non-intrinsic routine.

> src/hotspot/share/opto/intrinsicnode.cpp line 160:
> 
>> 158: 
>> 159: Node* compress_expand_identity(PhaseGVN* phase, Node* n) {
>> 160:   BasicType bt = n->bottom_type()->array_element_basic_type();
> 
> Why use of array_element_basic_type() here?  These are not arrays.

DONE,  in this case we are only concerned about INT/LONG so most accurate integral type based on value ranges is not needed.

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

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


More information about the hotspot-compiler-dev mailing list