RFR: 8283694: Improve bit manipulation and boolean to integer conversion operations on x86_64 [v5]
Quan Anh Mai
duke at openjdk.java.net
Thu Apr 7 03:06:32 UTC 2022
On Wed, 6 Apr 2022 22:34:54 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> 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.
I have changed the rule to use `ins_cost` instead for the prevention. Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7968
More information about the hotspot-compiler-dev
mailing list