Commit 765ef716 authored by jing.bao's avatar jing.bao Committed by V8 LUCI CQ

[wasm-simd][x64] Optimize X64S16x8HalfShuffle1 for mask 0xe4

Change-Id: I9b0f746e68924d22bdd2c0f693a9b0e8b078a4f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3026035Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#75729}
parent 4b6b4cab
......@@ -4025,8 +4025,15 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kX64S16x8HalfShuffle1: {
XMMRegister dst = i.OutputSimd128Register();
ASSEMBLE_SIMD_IMM_INSTR(Pshuflw, dst, 0, i.InputUint8(1));
__ Pshufhw(dst, dst, i.InputUint8(2));
uint8_t mask_lo = i.InputUint8(1);
uint8_t mask_hi = i.InputUint8(2);
if (mask_lo != 0xe4) {
ASSEMBLE_SIMD_IMM_INSTR(Pshuflw, dst, 0, mask_lo);
if (mask_hi != 0xe4) __ Pshufhw(dst, dst, mask_hi);
} else {
DCHECK_NE(mask_hi, 0xe4);
ASSEMBLE_SIMD_IMM_INSTR(Pshufhw, dst, 0, mask_hi);
}
break;
}
case kX64S16x8HalfShuffle2: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment