AVX: Handle full broadcast in VDPPS

Another trivial case that can be handled without crazy codegen.
This commit is contained in:
LC committed 2026-06-27 10:11:27 -04:00
1 parent 11fe95d8ea
commit ee2fb57f4e
2 files changed
+9 -54

No files matched your search

@@ -4679,8 +4679,12 @@ Ref OpDispatchBuilder::VDPPSOpImpl(OpcodeArgs, const X86Tables::DecodedOperand&
// Now using the destination mask we choose where the result ends up
// It can duplicate and zero results
Ref Result = ZeroVec;
if (DstMask == 0b1111) {
// Full broadcast
return _VDupElement(DstSize, ElementSize, Temp, 0);
}
Ref Result = ZeroVec;
for (size_t i = 0; i < IR::NumElements(DstSize, ElementSize); ++i) {
const auto Bit = 1U << (i % 4);
@@ -4688,7 +4692,6 @@ Ref OpDispatchBuilder::VDPPSOpImpl(OpcodeArgs, const X86Tables::DecodedOperand&
Result = _VInsElement(DstSize, ElementSize, i, 0, Result, Temp);
}
}
return Result;
}