RFR: 8261671: X86 I2L conversion can be skipped for certain masked positive values [v2]

Florian Weimer fweimer at openjdk.java.net
Wed Feb 17 05:58:39 UTC 2021


On Tue, 16 Feb 2021 17:39:34 GMT, Marcus G K Williams <github.com+168222+mgkwill at openjdk.org> wrote:

>> src/hotspot/cpu/x86/x86_64.ad line 9172:
>> 
>>> 9170: instruct convI2LAndI_reg_immIbitmask(rRegL dst, rRegI src, immI_bitmask mask, rRegI tmp, rFlagsReg cr)
>>> 9171: %{
>>> 9172:   predicate(VM_Version::supports_bmi2());
>> 
>> Agner's optimization guide says that BZHI uses microcode on Zen 2 and earlier, so perhaps the predicate should reflect that?
>
> Added `predicate(VM_Version::supports_bmi2() && VM_Version::is_intel());`

I'm so sorry, I confused this with `PDEP` and `PEXT`. `BZHI` is actually fine on Zen. So the original code is correct.

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

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


More information about the hotspot-compiler-dev mailing list