[llvm] [RegisterCoalescer] Mark implicit-defs of super-registers as dead in remat (PR #159110)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 07:31:55 PDT 2025


================
@@ -1474,28 +1474,22 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
   //
   // The implicit-def of the super register may have been reduced to
   // subregisters depending on the uses.
-
-  bool NewMIDefinesFullReg = false;
-
-  SmallVector<MCRegister, 4> NewMIImplDefs;
+  SmallVector<std::pair<unsigned, MCRegister>, 4> NewMIImplDefs;
----------------
sdesmalen-arm wrote:

nit: If you make the type `Register` instead of `MCRegister`, you only need a single `asMCReg`() in `TRI->regunits(Reg.asMCReg())`.

https://github.com/llvm/llvm-project/pull/159110


More information about the llvm-commits mailing list