[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:
Wunkolo
2026-03-19 14:49:39 -07:00
committed by Gliniak
parent 00001a4fb1
commit b1983bab68

View File

@@ -1313,6 +1313,12 @@ void X64Emitter::LoadConstantXmm(Xbyak::Xmm dest, const vec128_t& v) {
}
if (all_equal_bytes) {
if (IsFeatureEnabled(kX64EmitGFNI)) {
vpxor(dest, dest);
vgf2p8affineqb(dest, dest, dest, firstbyte);
return;
}
void* bval = FindByteConstantOffset(firstbyte);
if (bval) {