RFR: 8367694: Fix jtreg test failure when Intel APX is enabled for KNL platforms
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon Sep 15 18:29:09 UTC 2025
On Mon, 15 Sep 2025 16:19:29 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
> This goal of this PR is fix the jtreg test failure observed in compiler test: `test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java`
>
> The test failure is occurring specifically for the tests with ids = {avx512-v064-A, avx512-v064-U, avx512-v032-A, avx512-v032-U}. These tests are run with KNL hardware features enabled (`-XX:+UseKNLSetting`).
>
> The two main causes of test failure are:
> 1. KNL does not support Intel APX. Currently, APX is not turned off when using KNL. This PR fixes this issue.
> 2. BMI2 instructions like sarxl are encoded incorrectly with `uses_vl=true` (use vector length). This PR fixes the encoding to use the correct one:`uses_vl=false`.
>
> After fixing these two bugs, `TestDependencyOffsets.java` is passing using the SDE emulator when APX is enabled.
src/hotspot/cpu/x86/vm_version_x86.cpp line 1020:
> 1018:
> 1019: // Currently APX support is only enabled for targets supporting AVX512VL feature.
> 1020: bool apx_supported = !is_knights_family() && os_supports_apx_egprs() && supports_apx_f() && supports_avx512vl();
Instead of adding is_knights_family check here, it is better to move the lines 1020-1028 after 1070.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27299#discussion_r2349787918
More information about the hotspot-dev
mailing list