RFR: 8313372: [JVMCI] Export vmIntrinsics::is_intrinsic_available results to JVMCI compilers. [v4]

Vladimir Kozlov kvn at openjdk.org
Thu Aug 10 17:05:29 UTC 2023


On Thu, 3 Aug 2023 07:09:18 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:

>> Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   cleanup.
>
> src/hotspot/cpu/x86/vm_version_x86.hpp line 689:
> 
>> 687:   static bool supports_avxonly()      { return ((supports_avx2() || supports_avx()) && !supports_evex()); }
>> 688:   static bool supports_sha()          { return (_features & CPU_SHA) != 0; }
>> 689:   static bool supports_fma()          { return (_features & CPU_FMA) != 0 && supports_avx(); }
> 
> https://github.com/openjdk/jdk/blob/53ca75b18ea419d469758475fac8352bf915b484/src/hotspot/cpu/x86/vm_version_x86.cpp#L1154-L1158
> implies fma intrinsic can be used without AVX

https://bugs.openjdk.org/browse/JDK-8181616  added support_avx() check because new Fma vectorization needs AVX: https://cr.openjdk.org/~vdeshpande/8181616/webrev.01/
Then we hit bug https://bugs.openjdk.org/browse/JDK-8182114 and bandaid it by restoring UseSSE check.
That change came before 8296168 which switch off UseAVX if UseSSE < 4:
https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/vm_version_x86.cpp#L908

This FMA check happens after UseSSE and UseAVX are set. I suggest to remove UseSSE check here instead and keep support_avx().

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15133#discussion_r1290424028


More information about the hotspot-compiler-dev mailing list