RFR: 8264104: Eliminate unnecessary vector mask conversion during VectorUnbox for floating point VectorMask [v2]

Vladimir Ivanov vlivanov at openjdk.java.net
Wed Apr 7 16:09:41 UTC 2021


On Tue, 6 Apr 2021 15:54:33 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Xiaohong Gong has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   8264104: Eliminate unnecessary vector mask conversion during VectorUnbox for floating point VectorMask
>
> @iwanowww should confirm correctness of such optimization.
> Regarding changes - they seem fine to me. I notice that VectorNode and its subclasses do not check for TOP inputs. Since Vector API introduce vectors in graph before SuperWord transformation their input could become dead. How such cases handled? And why we did not hit them yet? is_vect() should hit assert.

I'm not fond of the proposed approach. 

It hard-codes some implicit assumptions about vector mask representation.  
Also, vector type mismatch can trigger asserts since some vector-related code expects that types of vector inputs match precisely).

I suggest to introduce artificial cast nodes (`VectorLoadMask (VectorStoreMask vmask) ==> VectorMaskCast (vmask)`) which are then lowered into no-ops on backend side.

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

PR: https://git.openjdk.java.net/jdk/pull/3238


More information about the hotspot-compiler-dev mailing list