RFR: 8281544: assert(VM_Version::supports_avx512bw()) failed for Tests jdk/incubator/vector/ [v2]
Vladimir Kozlov
kvn at openjdk.java.net
Thu Feb 17 20:07:14 UTC 2022
On Thu, 17 Feb 2022 12:01:56 GMT, Emanuel Peter <duke at openjdk.java.net> wrote:
>> `ZSaveLiveRegisters::ZSaveLiveRegisters` stores live registers, and later they are loaded again.
>> This includes opmask registers, which are part of AVX512. However, not all platforms have all of the AVX512 instructions.
>> For example Knights Landing has general AVX512 support and makes use of optmask registers, but does not support the AVX512 BW subset of instructions, specifically it does not support the `kmovql` instruction. Platforms like Cannon Landing have support for AVX512 BW.
>>
>> Solution: in analogy to `RegisterSaver::save_live_registers`, which seems to perform a very similar task, use `MacroAssembler::kmov` instead of `kmovql` directly. Internally, `kmov` choses either `kmovql` if avx512bw is available, else it takes `kmovwl`.
>>
>> As a regression test, I took one of the tests that failed with `-XX:+UnlockExperimentalVMOptions -XX:+UseZGC`, and added an additional `@run` statement with those flags. I simulated this test locally with Intel Software Development Emulator:
>> `sde -knl`: Knights Landing, AVX512 but not BW, fails without change to `kmov`, passes with it.
>> `sde -cnl`: Cannon Landing, has AVX512 BW, passes before and after code change.
>>
>> Ran additional tests to verify that the test triggers before code change, and that with the code change nothing broke.
>>
>> @neliasso Thanks for the help!
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>
> fix indentation
Good.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7510
More information about the hotspot-compiler-dev
mailing list