RFR: 8277777: [Vector API] assert(r->is_XMMRegister()) failed: must be in x86_32.ad
Jie Fu
jiefu at openjdk.java.net
Wed Dec 1 06:53:29 UTC 2021
On Wed, 1 Dec 2021 06:34:41 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Hi all,
>>
>> The following vector api tests fail on x86_32/AVX512 with `assert(r->is_XMMRegister()) failed: must be`.
>>
>> jdk/incubator/vector/Byte64VectorLoadStoreTests.java
>> jdk/incubator/vector/Byte256VectorLoadStoreTests.java
>> jdk/incubator/vector/Byte128VectorLoadStoreTests.java
>> jdk/incubator/vector/ByteMaxVectorLoadStoreTests.java
>> jdk/incubator/vector/Double256VectorTests.java
>> jdk/incubator/vector/Double512VectorTests.java
>> jdk/incubator/vector/DoubleMaxVectorTests.java
>> jdk/incubator/vector/Float512VectorTests.java
>> jdk/incubator/vector/Float256VectorTests.java
>> jdk/incubator/vector/FloatMaxVectorTests.java
>> jdk/incubator/vector/Float128VectorTests.java
>> jdk/incubator/vector/Short128VectorLoadStoreTests.java
>> jdk/incubator/vector/Short256VectorLoadStoreTests.java
>> jdk/incubator/vector/Short64VectorLoadStoreTests.java
>> jdk/incubator/vector/ShortMaxVectorLoadStoreTests.java
>>
>>
>> The reason is that `static enum RC rc_class( OptoReg::Name reg )` [1] missed the case for KRegister.
>> And the AVX-512 opmask specific spilling code [2] should be located before the size assert [3].
>>
>> Thanks.
>> Best regards,
>> Jie
>>
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L747
>> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1272
>> [3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1252
>
> src/hotspot/cpu/x86/x86_32.ad line 1309:
>
>> 1307: if( dst_second_rc == rc_int && src_second_rc == rc_stack )
>> 1308: return impl_helper(cbuf,do_size,true ,ra_->reg2offset(src_second),dst_second,0x8B,"MOV ",size, st);
>> 1309:
>
> This change looks unrelated to opmask spilling.
Thanks @jatin-bhateja for your review.
Actually, the part of change just moves the AVX-512 opmask specific spilling code [1] before the size assert [2].
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1272
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1252
-------------
PR: https://git.openjdk.java.net/jdk/pull/6535
More information about the hotspot-compiler-dev
mailing list