RFR: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays) [v8]
Magnus Ihse Bursie
ihse at openjdk.org
Tue Dec 5 11:21:36 UTC 2023
On Mon, 4 Dec 2023 22:14:14 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:
>> Then you must add logic to check for this. Now the build will just fail if building with an older gcc. That is not acceptable.
>
> Hi Marcus (@magicus), please see the updated code which added guards to check for GCC version >= 7.5 in `src/java.base/linux/native/libsimdsort/{avx2-linux-qsort.cpp, avx512-linux-qsort.cpp}`. GCC >= 7.5 is needed to compile libsimdsort using C++17 features. Made sure that OpenJDK builds without errors using both GCC 7.5 and GCC 6.4.
That sounds weird. You can't check for if compiler options should be enabled or not inside source code files.
Are you saying that when compiling with GCC 6, it will just silently ignore `-std=c++17`? I'd have assumed that it printed a warning or error about an unknown or invalid option, if C++17 is not supported.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16534#discussion_r1415392615
More information about the hotspot-compiler-dev
mailing list