RFR: 8283694: Improve bit manipulation and boolean to integer conversion operations on x86_64 [v5]
Vladimir Kozlov
kvn at openjdk.java.net
Thu Apr 7 18:57:43 UTC 2022
On Wed, 6 Apr 2022 22:40:12 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> src/hotspot/cpu/x86/x86_64.ad line 9438:
>>
>>> 9436:
>>> 9437: // Arithmetic Shift Right by 8-bit immediate
>>> 9438: instruct sarL_mem_imm(memory dst, immI shift, rFlagsReg cr)
>>
>> Why this change to type of constant?
>
> For other shift nodes, the `Ideal` method clips the constant shift count to be in the correct range so we can match `immI8` with it. The `RShiftLNode` does not have an `Ideal` method so we have to do that in the backend. Previously, constant shifts that out-of-bounds for 8-bit immediate still match with the variable shift rule, but as I exclude constant shifts from `sarL_rReg_rReg`, this reveals.
> Thank you very much.
okay.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7968
More information about the hotspot-compiler-dev
mailing list