Skip to content

Commit 5a5fb8a

Browse files
committed
[Bug] Fixed VPERMQ incorrectly reporting AVX2 instead of AVX512-F features (X86 features API)
1 parent 2ab380e commit 5a5fb8a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/asmjit/x86/x86instapi.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,11 +1607,15 @@ Error InstInternal::queryFeatures(uint32_t arch, const BaseInst& inst, const Ope
16071607
mustUseEvex = opCount >= 2 && x86::Reg::isGp(operands[1]);
16081608
break;
16091609

1610-
// Special case: VPERMPD only supports YMM predicate in AVX mode, immediate
1611-
// precicate is only supported by AVX512-F and newer.
1610+
// Special case: VPERMPD - AVX2 vs AVX512-F case.
16121611
case Inst::kIdVpermpd:
16131612
mustUseEvex = opCount >= 3 && !operands[2].isImm();
16141613
break;
1614+
1615+
// Special case: VPERMQ - AVX2 vs AVX512-F case.
1616+
case Inst::kIdVpermq:
1617+
mustUseEvex = opCount >= 3 && (operands[1].isMem() || !operands[2].isImm());
1618+
break;
16151619
}
16161620

16171621
if (!(usesAvx512 | mustUseEvex | regAnalysis.highVecUsed))

0 commit comments

Comments
 (0)