RFR: 8283694: Improve bit manipulation and boolean to integer conversion operations on x86_64 [v5]

Quan Anh Mai duke at openjdk.java.net
Wed Apr 6 22:38:45 UTC 2022


On Wed, 6 Apr 2022 17:58:59 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   movzx is not elided with same input and output
>
> src/hotspot/cpu/x86/x86_64.ad line 9061:
> 
>> 9059: %{
>> 9060:   // This is to match that of the memory variance
>> 9061:   predicate(VM_Version::supports_bmi2() && !n->in(2)->is_Con());
> 
> Why you check for constant shift? With bmi2 check you excluded other reg_reg instruction. And for constant shift we have `salI_rReg_imm`.

Hi, the check is to match the predicates of `rReg_rReg` and `mem_rReg` versions so that the ADLC can correctly mark the latter to be the cisc-spill of the former. And the predicate of `salI_mem_rReg` is to prevent `LShiftI (LoadI mem) imm` from being matched by the variable shift bmi2 rule.

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

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


More information about the hotspot-compiler-dev mailing list