RFR: 8281544: assert(VM_Version::supports_avx512bw()) failed for Tests jdk/incubator/vector/ [v2]

Emanuel Peter duke at openjdk.java.net
Thu Feb 17 12:01:56 UTC 2022


> `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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7510/files
  - new: https://git.openjdk.java.net/jdk/pull/7510/files/9e4169fb..7636119d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7510&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7510&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7510.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7510/head:pull/7510

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


More information about the hotspot-dev mailing list