x64Emitter: Prefer MOVAPS to MOVSD

* The high half of regOp is immediately overwritten so the value in it is irrelevant.
* MOVSD produces an unnecessary dependency on the high half of regOp.
* MOVAPS is implemented as a register rename on modern microarchitectures.
This commit is contained in:
MerryMage 2019-04-27 12:56:05 +01:00
parent 2d4dd8cdc1
commit 1baa8ee970
1 changed files with 7 additions and 1 deletions

View File

@ -2429,8 +2429,14 @@ void XEmitter::MOVDDUP(X64Reg regOp, const OpArg& arg)
}
else
{
if (!arg.IsSimpleReg(regOp))
if (!arg.IsSimpleReg())
{
MOVSD(regOp, arg);
}
else if (regOp != arg.GetSimpleReg())
{
MOVAPD(regOp, arg);
}
UNPCKLPD(regOp, R(regOp));
}
}