[compiler] Emit vpbroadcastb for I8x16Splat on x64 if supported
Change-Id: Iec90b4821f41838eb4c2bae26035af4e30082ef9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762140 Reviewed-by: Zhi An Ng <zhin@chromium.org> Commit-Queue: Frank Emrich <emrich@google.com> Cr-Commit-Position: refs/heads/master@{#73428}
This commit is contained in:
parent
93c2406502
commit
96217d357f
@ -3352,13 +3352,25 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
case kX64I8x16Splat: {
|
||||
XMMRegister dst = i.OutputSimd128Register();
|
||||
if (HasRegisterInput(instr, 0)) {
|
||||
__ Movd(dst, i.InputRegister(0));
|
||||
if (CpuFeatures::IsSupported(AVX2)) {
|
||||
CpuFeatureScope avx_scope(tasm(), AVX);
|
||||
CpuFeatureScope avx2_scope(tasm(), AVX2);
|
||||
if (HasRegisterInput(instr, 0)) {
|
||||
__ vmovd(kScratchDoubleReg, i.InputRegister(0));
|
||||
__ vpbroadcastb(dst, kScratchDoubleReg);
|
||||
} else {
|
||||
__ vpbroadcastb(dst, i.InputOperand(0));
|
||||
}
|
||||
} else {
|
||||
__ Movd(dst, i.InputOperand(0));
|
||||
if (HasRegisterInput(instr, 0)) {
|
||||
__ Movd(dst, i.InputRegister(0));
|
||||
} else {
|
||||
__ Movd(dst, i.InputOperand(0));
|
||||
}
|
||||
__ Xorps(kScratchDoubleReg, kScratchDoubleReg);
|
||||
__ Pshufb(dst, kScratchDoubleReg);
|
||||
}
|
||||
__ Xorps(kScratchDoubleReg, kScratchDoubleReg);
|
||||
__ Pshufb(dst, kScratchDoubleReg);
|
||||
|
||||
break;
|
||||
}
|
||||
case kX64Pextrb: {
|
||||
|
Loading…
Reference in New Issue
Block a user