RFR: 8296168: x86: Add reasonable constraints between AVX and SSE
Vladimir Ivanov
vlivanov at openjdk.org
Wed Nov 2 17:29:21 UTC 2022
On Wed, 2 Nov 2022 12:44:42 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> We've not seen any x86 CPU, Intel or otherwise, where AVX features are available but SSE 4.1 is not supported. This patch suggests constraining setup so that any explicit value of UseSSE less than 4 (the default on any AVX-supporting CPU) implicitly disables AVX. This simplifies ergonomics and reduces the testing surface. Concretely this would allow #10847 to not have to guard the new intrinsic on UseSSE level to avoid some surprising test failures in tests verifying SSE-enabled intrinsics.
>
> I've rearranged the initialization of UseAVX and UseSSE to allow AVX to look at the post-ergo values of UseSSE.
>
> Testing: tier1-tier3, manual verification
src/hotspot/cpu/x86/vm_version_x86.cpp line 905:
> 903: warning("UseSSE=%d is not supported on this CPU, setting it to UseSSE=%d", (int) UseSSE, use_sse_limit);
> 904: FLAG_SET_DEFAULT(UseSSE, use_sse_limit);
> 905: } else if (UseSSE < 0) {
`UseSSE < 0` check is redundant since the flag is already constrained to `[0..99]` range.
src/hotspot/cpu/x86/vm_version_x86.cpp line 941:
> 939: }
> 940: FLAG_SET_DEFAULT(UseAVX, use_avx_limit);
> 941: } else if (UseAVX < 0) {
`UseAVX < 0` check can also be cleaned up.
-------------
PR: https://git.openjdk.org/jdk/pull/10946
More information about the hotspot-compiler-dev
mailing list