================
@@ -711,11 +730,12 @@ Printable Rematerializer::printRematReg(RegisterIdx 
RegIdx,
       }
       OS << "] ";
     }
-    OS << printID(RegIdx) << ' ';
-    PrintReg.DefMI->print(OS, /*IsStandalone=*/true, /*SkipOpers=*/false,
-                          /*SkipDebugLoc=*/false, /*AddNewLine=*/false);
-    OS << " @ ";
-    LIS.getInstructionIndex(*PrintReg.DefMI).print(OS);
+    if (PrintReg.isAlive()) {
+      PrintReg.DefMI->print(OS, /*IsStandalone=*/true, /*SkipOpers=*/false,
+                            /*SkipDebugLoc=*/false, /*AddNewLine=*/false);
+      OS << " @ ";
+      LIS.getInstructionIndex(*PrintReg.DefMI).print(OS);
----------------
arsenm wrote:

```suggestion
      OS << " @ " << LIS.getInstructionIndex(*PrintReg.DefMI);
```

https://github.com/llvm/llvm-project/pull/197579
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to