8343419: Assertion failure in long vector unsigned min/max with -XX:+UseKNLSetting
Reviewed-by: sviswanathan
This commit is contained in:
parent
c82ad845e1
commit
3c7082a633
@ -963,6 +963,16 @@ void C2_MacroAssembler::vpuminmax(int opcode, BasicType elem_bt, XMMRegister dst
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::vpuminmaxq(int opcode, XMMRegister dst, XMMRegister src1, XMMRegister src2, XMMRegister xtmp1, XMMRegister xtmp2, int vlen_enc) {
|
||||
// For optimality, leverage a full vector width of 512 bits
|
||||
// for operations over smaller vector sizes on AVX512 targets.
|
||||
if (VM_Version::supports_evex() && !VM_Version::supports_avx512vl()) {
|
||||
if (opcode == Op_UMaxV) {
|
||||
evpmaxuq(dst, k0, src1, src2, false, Assembler::AVX_512bit);
|
||||
} else {
|
||||
assert(opcode == Op_UMinV, "required");
|
||||
evpminuq(dst, k0, src1, src2, false, Assembler::AVX_512bit);
|
||||
}
|
||||
} else {
|
||||
// T1 = -1
|
||||
vpcmpeqq(xtmp1, xtmp1, xtmp1, vlen_enc);
|
||||
// T1 = -1 << 63
|
||||
@ -981,6 +991,7 @@ void C2_MacroAssembler::vpuminmaxq(int opcode, XMMRegister dst, XMMRegister src1
|
||||
vpblendvb(dst, src2, src1, xtmp1, vlen_enc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::vpuminmax(int opcode, BasicType elem_bt, XMMRegister dst,
|
||||
XMMRegister src1, XMMRegister src2, int vlen_enc) {
|
||||
|
@ -2138,10 +2138,13 @@ bool Matcher::match_rule_supported_vector_masked(int opcode, int vlen, BasicType
|
||||
case Op_StoreVectorScatterMasked:
|
||||
return true;
|
||||
|
||||
case Op_MaxV:
|
||||
case Op_MinV:
|
||||
case Op_UMinV:
|
||||
case Op_UMaxV:
|
||||
if (size_in_bits < 512 && !VM_Version::supports_avx512vl()) {
|
||||
return false;
|
||||
} // fallthrough
|
||||
case Op_MaxV:
|
||||
case Op_MinV:
|
||||
if (is_subword_type(bt) && !VM_Version::supports_avx512bw()) {
|
||||
return false; // Implementation limitation
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user