RFR: 8262355: Support for AVX-512 opmask register allocation. [v3]
Xiaohong Gong
xgong at openjdk.java.net
Mon Mar 29 07:52:31 UTC 2021
On Mon, 29 Mar 2021 07:34:53 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/share/opto/type.hpp line 856:
>>
>>> 854: };
>>> 855:
>>> 856: class TypeVectMask : public TypeVect {
>>
>> Hi, recently we found an issue that some optimizations cannot work well for the floating point VectorMask due to the different element type for different APIs (see: https://github.com/openjdk/jdk/pull/3238). It might need more consideration for the `hash()/eq()` method `TypeVectMask` especially for SVE. I guess the current implementation works well for AVX-512? If so, maybe we can have a separate patch to fix it in future once the main mask support codes are merged.
>
> Hi, bitwise operation involving VectorMask nodes (i.e. the nodes with type TypeVectMask) works over predicate registers. Since for x86 opmask register representation is consistent for all primitive types, it may not be a problem. For SVE a different instruction pattern for masks of floating types may suffice. Yes, we can do refinements in subsequent patches.
OK, thanks! Another consideration is: since mask type representations are different for platforms that do not have mask features (using TypeVect), and SVE/AVX-512 (using TypeVectMask). And this special handling is needed for both platforms/types. Is it possible to use one type (i.e. TypeVectMask) for all mask types, with different `idea_reg()` for different platforms (like what you did in your original patch) ? Or did you have considered this solution before? Same with above, we can also refine this in future if it's possible.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2768
More information about the hotspot-compiler-dev
mailing list