[jdk17] RFR: 8269528: VectorAPI Long512VectorTest fails on X86 KNL target

Jatin Bhateja jbhateja at openjdk.java.net
Tue Jun 29 16:30:25 UTC 2021


Long512VectorTest shows assertion failure on fastdebug build and incorrectness issue in release build.

Problem is seen on targets missing AVX512BW feature, load_vector_mask operation loads the mask boolean array into 
a vector followed by signed expansion operation to match the vector with of the operation. 
load_vector_mask macro assembly routine uses a vpsubb instruction which necessities existence of AVX512BW feature
while operating over 64 byte operands.

Load mask over Byte512 and Short512 species does not get intrinsified since Matcher::match_rule_supported_vector
check for legality of vector size against the maximum vector size supported by the target, in case of 64 byte subword type
operation, an AVX512 target must support AVX512BW feature else vector size is reduced to 32 bytes. 

For a load mask operation on all other species i.e. Int512,Float512,Double512,Long512 underlined mask boolean array
is 16 bytes or less, thus a 256bit AVX2 byte vpsubb should suffice, also subsequent unpacking instruction (VPMOVSD, VPMOVSQ)
needs AVX512F feature.

legVec register class constrains the allocation set of operands of new loadmask instruction pattern for non-AVX512BW
targets to lower register bank ([X/Y]MM0-15 registers).

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

Commit messages:
 - 8269528: VectorAPI Long512VectorTest fails on X86 KNL target

Changes: https://git.openjdk.java.net/jdk17/pull/174/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=174&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269528
  Stats: 22 lines in 3 files changed: 17 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/174.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/174/head:pull/174

PR: https://git.openjdk.java.net/jdk17/pull/174


More information about the hotspot-compiler-dev mailing list