mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 07:00:43 +02:00
OpcodeDispatcher: optimize test x, x
fewer uops now that we invert carry Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
894aaa980f
commit
5d613e8716
2 files changed
+23
-4
No files matched your search
@@ -1006,8 +1006,14 @@ void OpDispatchBuilder::TESTOp(OpcodeArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
HandleNZ00Write();
|
||||
CalculatePF(_AndWithFlags(IR::SizeToOpSize(Size), Dest, Src));
|
||||
// Try to optimize out the AND.
|
||||
if (Dest == Src) {
|
||||
SetNZP_ZeroCV(Size, Src);
|
||||
} else {
|
||||
HandleNZ00Write();
|
||||
CalculatePF(_AndWithFlags(IR::SizeToOpSize(Size), Dest, Src));
|
||||
}
|
||||
|
||||
InvalidateAF();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user