[jdk20] RFR: 8299715: IR test: VectorGatherScatterTest.java fails with SVE randomly

Xiaohong Gong xgong at openjdk.org
Wed Jan 11 01:50:19 UTC 2023


On Tue, 10 Jan 2023 17:44:47 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> The IR check fails randomly on two unit tests: `"testLoadGatherMasked"`
>> and `"testStoreScatterMasked"`. The two tests call the vector mask
>> controlled load_gather/store_scatter vector APIs, and the compiler
>> will generate the` "LoadVectorGatherMasked"`/`"StoreVectorScatterMasked"`
>> IR normally if the corresponding API is intrinsified successfully.
>> So for normal cases, the following IR check can success:
>> 
>> 
>>   @IR(counts = { IRNode.LOAD_VECTOR_GATHER_MASKED, ">= 1" })
>> 
>> 
>> But if all the lane values in the vector mask are true, the masked
>> API will be implemented with the corresponding un-masked API instead
>> (see the masked load gather API implementation [1]). And the C2 compiler
>> generates the un-masked IRs, i.e. `"LoadVectorGather"`/`"StoreVectorScatter"`.
>> For such cases, the above IR check will fail.
>> 
>> To make sure the masked load_gather/store_scatter IR is generated by
>> C2 compiler, we have to modify the mask input in the test to make sure
>> the vector mask is not alltrue.
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java#L2931
>
> Marked as reviewed by psandoz (Reviewer).

@PaulSandoz  @TobiHartmann , thanks for the review !

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

PR: https://git.openjdk.org/jdk20/pull/90


More information about the hotspot-compiler-dev mailing list