Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v4]
On Thu, 12 May 2022 22:48:26 GMT, Vladimir Ivanov wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8284960: Review comments resolution. > > src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 7953: > >> 7951: StubRoutines::x86::_vector_iota_indices = >> generate_iota_indices("iota_indices"); >> 7952: >> 7953: if (UsePopCountInstruction && VM_Version::supports_avx2() && >> !VM_Version::supports_avx512_vpopcntdq()) { > > Why is the LUT unconditionally generated? `UsePopCountInstruction` still > guides the usages. LUT should be generated only if UsePopCountInsturction is false and iff target does not support necessary features, AVX512POPCNTDQ (for int/long vectors) and AVX512_BITALG (for sub-word vectors). Please refer to following discussion where it was suggested to restrict the scope of flag to only scalar popcount operation. https://github.com/openjdk/panama-vector/pull/185#discussion_r847758463 - PR: https://git.openjdk.java.net/jdk/pull/8425
Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v4]
> Hi All, > > Patch adds the planned support for new vector operations and APIs targeted > for [JEP 426: Vector API (Fourth > Incubator).](https://bugs.openjdk.java.net/browse/JDK-8280173) > > Following is the brief summary of changes:- > > 1) Extends the scope of existing lanewise API for following new vector > operations. >- VectorOperations.BIT_COUNT: counts the number of one-bits >- VectorOperations.LEADING_ZEROS_COUNT: counts the number of leading zero > bits >- VectorOperations.TRAILING_ZEROS_COUNT: counts the number of trailing > zero bits >- VectorOperations.REVERSE: reversing the order of bits >- VectorOperations.REVERSE_BYTES: reversing the order of bytes >- compress and expand bits: Semantics are based on Hacker's Delight > section 7-4 Compress, or Generalized Extract. > > 2) Adds following new APIs to perform cross lane vector compress and > expansion operations under the influence of a mask. >- Vector.compress >- Vector.expand >- VectorMask.compress > > 3) Adds predicated and non-predicated versions of following new APIs to load > and store the contents of vector from foreign MemorySegments. > - Vector.fromMemorySegment > - Vector.intoMemorySegment > > 4) C2 Compiler IR enhancements and optimized X86 and AARCH64 backend support > for each newly added operation. > > > Patch has been regressed over AARCH64 and X86 targets different AVX levels. > > Kindly review and share your feedback. > > Best Regards, > Jatin Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision: 8284960: Review comments resolution. - Changes: - all: https://git.openjdk.java.net/jdk/pull/8425/files - new: https://git.openjdk.java.net/jdk/pull/8425/files/b021e082..adf205f9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8425=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8425=02-03 Stats: 121 lines in 49 files changed: 8 ins; 5 del; 108 mod Patch: https://git.openjdk.java.net/jdk/pull/8425.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8425/head:pull/8425 PR: https://git.openjdk.java.net/jdk/pull/8425