[llvm-branch-commits] [llvm] [CodeGen][AMDGPU] Prepare rematerializer for multi-def remat support (NFC) (PR #197579)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 14 04:26:11 PDT 2026
================
@@ -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
More information about the llvm-branch-commits
mailing list