From d4403edea9691cbcba793105c86d6367c9aca5cb Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 21 Oct 2023 21:33:07 -0700 Subject: [PATCH] OpcodeDispatcher: Updates COMIS to eliminate scalar moves This was one of the few things that managed to hit the previously removed optimization. Just fix the OpcodeDispatcher instead. --- FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp index c24ebaf0e..de61a2fd7 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp @@ -3432,8 +3432,9 @@ void OpDispatchBuilder::VPALIGNROp(OpcodeArgs) { template void OpDispatchBuilder::UCOMISxOp(OpcodeArgs) { - OrderedNode *Src1 = LoadSource(FPRClass, Op, Op->Dest, Op->Flags); - OrderedNode *Src2 = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags); + const auto SrcSize = Op->Src[0].IsGPR() ? GetGuestVectorLength() : GetSrcSize(Op); + OrderedNode *Src1 = LoadSource_WithOpSize(FPRClass, Op, Op->Dest, GetGuestVectorLength(), Op->Flags); + OrderedNode *Src2 = LoadSource_WithOpSize(FPRClass, Op, Op->Src[0], SrcSize, Op->Flags); OrderedNode *Res = _FCmp(ElementSize, Src1, Src2, (1 << FCMP_FLAG_EQ) | (1 << FCMP_FLAG_LT) |