[llvm] Remove dead flags from virtual registers, but only when not compiling for MIPS (PR #86462)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 14:01:07 PDT 2024


https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/86462

>From 34c948bcc6349e27bf7c761f57024d8c5da73b14 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Sun, 24 Mar 2024 22:14:59 -0400
Subject: [PATCH] Remove dead flags from virtual registers,

---
 llvm/lib/CodeGen/LiveVariables.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index b85526cfb380b6..25d778c3b86ca0 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -512,7 +512,7 @@ void LiveVariables::runOnInstr(MachineInstr &MI,
       assert(MO.isDef());
       // FIXME: We should not remove any dead flags. However the MIPS RDDSP
       // instruction needs it at the moment: http://llvm.org/PR27116.
-      if (MOReg.isPhysical() && !MRI->isReserved(MOReg))
+      if (!(MOReg.isPhysical() && MRI->isReserved(MOReg)))
         MO.setIsDead(false);
       DefRegs.push_back(MOReg);
     }



More information about the llvm-commits mailing list