mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 16:00:18 +02:00
RedundantFlagCalculationElimination: fix convergence issue
If both the destination and the flags are dead for an AddWithFlags, we need to eliminate it in one pass. If we only replace without elimiating, we would need a second DCE pass to eliminate. We want DCE to finish in one pass, so fix this. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
273d086a7b
commit
cf77f2ae5d
1 file changed
+1
-1
@@ -362,7 +362,7 @@ void DeadFlagCalculationEliminination::Run(IREmitter* IREmit) {
|
||||
bool Eliminated = false;
|
||||
|
||||
if ((FlagsRead & Info.Write) == 0) {
|
||||
if (Info.CanEliminate && CodeNode->GetUses() == 0) {
|
||||
if ((Info.CanEliminate || Info.CanReplace) && CodeNode->GetUses() == 0) {
|
||||
IREmit->Remove(CodeNode);
|
||||
Eliminated = true;
|
||||
} else if (Info.CanReplace) {
|
||||
|
||||
Reference in new issue
Block a user