[x64] Add AVX512 optimization for `NOT_V128`

This commit is contained in:
Wunkolo 2022-09-05 08:17:33 -07:00 committed by Rick Gibbed
parent 7595cdb52b
commit b0cc3db4d8
1 changed files with 4 additions and 0 deletions

View File

@ -2891,6 +2891,10 @@ struct NOT_I64 : Sequence<NOT_I64, I<OPCODE_NOT, I64Op, I64Op>> {
};
struct NOT_V128 : Sequence<NOT_V128, I<OPCODE_NOT, V128Op, V128Op>> {
static void Emit(X64Emitter& e, const EmitArgType& i) {
if (e.IsFeatureEnabled(kX64EmitAVX512Ortho)) {
e.vpternlogd(i.dest, i.src1, i.src1, 0b01010101);
return;
}
// dest = src ^ 0xFFFF...
e.vpxor(i.dest, i.src1, e.GetXmmConstPtr(XMMFFFF /* FF... */));
}