[jdk17] RFR: 8269580: assert(is_valid()) failed: invalid register (-1)
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Wed Jun 30 20:43:00 UTC 2021
On Tue, 29 Jun 2021 15:34:18 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> - Assertion fails during emit phase of rep_stos instruction pattern on targets not supporting AVX512BW feature.
> - Pattern is selected under following predication logic.
> predicate(!((ClearArrayNode*)n)->is_large() &&
> (UseAVX <= 2 || !VM_Version::supports_avx512vlbw()));
> - Encoding block of this pattern passes a knoreg opmask register having a default encoding of -1, this later causes an assertion failure while assembling instruction operating over this register.
> - Existing pattern rep_stos_evex should be able to handle case for AVX512 targets as instructions operating of opmask registers are anyways guarded by target feature checks.
src/hotspot/cpu/x86/x86_64.ad line 11088:
> 11086: %{
> 11087: predicate(!((ClearArrayNode*)n)->is_large() &&
> 11088: UseAVX > 2 &&
VM_Version::supports_avx512vlbw() check is required otherwise MacroAssembler::clear_mem will assert. See the code snippet below. The assert is generated because the emovdqu with smaller than 512 bit vector width is not supported unless avx512vl() is available on the platform.
// Clearing constant sized memory using YMM/ZMM registers.
void MacroAssembler::clear_mem(Register base, int cnt, Register rtmp, XMMRegister xtmp, KRegister mask) {
assert(UseAVX > 2 && VM_Version::supports_avx512vlbw(), "");
-------------
PR: https://git.openjdk.java.net/jdk17/pull/172
More information about the hotspot-compiler-dev
mailing list