[15] RFR (M): 8239008: C2: Simplify Replicate support for sub-word types on x86

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Feb 13 15:55:28 UTC 2020


http://cr.openjdk.java.net/~vlivanov/8239008/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8239008

Simplify Replicate support for sub-word types on x86 based on the 
following observations:
   * 512-bit vectors of sub-word element types are supported only on 
AVX512BW-capable hardware [1];
   * VBROADCASTS[SD]/VPBROADCAST[BWDQ] are available since AVX/AVX2.

Also, fixed asserts in VBROADCASTS[SD] according to the manual:
   * reg-to-reg variants are part of AVX2 (while mem-to-reg are 
introduced in AVX);
   * VBROADCASTSD doesn't have 128-bit variant.

Testing: hs-precheckin-comp,hs-tier1,hs-tier2

Thanks!

Best regards,
Vladimir Ivanov

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/cpu/x86/x86.ad#l1524

const int Matcher::vector_width_in_bytes(BasicType bt) {
...
   if (UseAVX > 2 && (bt == T_BYTE || bt == T_SHORT || bt == T_CHAR))
     size = (VM_Version::supports_avx512bw()) ? 64 : 32;


More information about the hotspot-compiler-dev mailing list