RFR: 8262916: Merge LShiftCntV and RShiftCntV into a single node

Vladimir Ivanov vlivanov at openjdk.java.net
Thu Apr 8 11:08:25 UTC 2021

On Thu, 8 Apr 2021 05:14:52 GMT, Dean Long <dlong at openjdk.org> wrote:

> You should be able to do this without introducing a new node type. You could change the shift rules to match a vector register like x86.ad and aarch64_sve.ad already do.

Not sure what you refer to in x86.ad: vector shifts with variable scalar count require the scalar to be placed in XMM register. `ShiftCntV` handles register-to-register move between different register classes (`RegI` and `Vec*`). 

Do you suggest reusing some existing vector node (like `Replicate`) to covert the scalar index to vector first? It would have slightly different behavior on x86.


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

More information about the hotspot-compiler-dev mailing list