OpcodeDispatcher: Optimize NOP vector move

Move instruction to itself here is a nop.
Need to be careful about AVX operations which use a different handler
since those might actually zero the upper bits on 128-bit move
This commit is contained in:
Ryan Houdek committed 2023-09-12 16:10:39 -07:00
1 parent 90f7937146
commit 304dba5f20
1 file changed
+5
@@ -24,6 +24,11 @@ namespace FEXCore::IR {
#define OpcodeArgs [[maybe_unused]] FEXCore::X86Tables::DecodedOp Op
void OpDispatchBuilder::MOVVectorOp(OpcodeArgs) {
if (Op->Dest.IsGPR() && Op->Src[0].IsGPR() &&
Op->Dest.Data.GPR.GPR == Op->Src[0].Data.GPR.GPR) {
// Nop
return;
}
OrderedNode *Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags, 1);
StoreResult(FPRClass, Op, Src, 1);
}