[llvm] [TwoAddressInstruction] Recompute live intervals for partial defs (PR #74431)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 00:16:35 PST 2024


================
@@ -1937,13 +1937,16 @@ eliminateRegSequence(MachineBasicBlock::iterator &MBBI) {
   }
 
   bool DefEmitted = false;
+  bool DefIsPartial = false;
   for (unsigned i = 1, e = MI.getNumOperands(); i < e; i += 2) {
     MachineOperand &UseMO = MI.getOperand(i);
     Register SrcReg = UseMO.getReg();
     unsigned SubIdx = MI.getOperand(i+1).getImm();
     // Nothing needs to be inserted for undef operands.
-    if (UseMO.isUndef())
+    if (UseMO.isUndef()) {
+      DefIsPartial = true;
----------------
perlfu wrote:

Yes, those should have already been handled.

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


More information about the llvm-commits mailing list