[x64] Add GFNI optimization for single-byte vector splats
Use the `vgf2p8affineqb` instruction to splat byte-values across a whole register without having to touch memory.
This commit is contained in:
@@ -1313,6 +1313,12 @@ void X64Emitter::LoadConstantXmm(Xbyak::Xmm dest, const vec128_t& v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (all_equal_bytes) {
|
if (all_equal_bytes) {
|
||||||
|
if (IsFeatureEnabled(kX64EmitGFNI)) {
|
||||||
|
vpxor(dest, dest);
|
||||||
|
vgf2p8affineqb(dest, dest, dest, firstbyte);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void* bval = FindByteConstantOffset(firstbyte);
|
void* bval = FindByteConstantOffset(firstbyte);
|
||||||
|
|
||||||
if (bval) {
|
if (bval) {
|
||||||
|
|||||||
Reference in New Issue
Block a user