[llvm] [llvm][CodeGen] Fix the issue caused by live interval checking in window scheduler (PR #123184)

Hua Tian via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 01:33:18 PST 2025


================
@@ -303,6 +303,7 @@ void WindowScheduler::generateTripleMBB() {
       if (Register AntiReg = getAntiRegister(MI))
         DefPairs[MI->getOperand(0).getReg()] = AntiReg;
     auto *NewMI = MF->CloneMachineInstr(MI);
+    Context->LIS->RemoveMachineInstrFromMaps(*NewMI);
----------------
huaatian wrote:

It is indeed a strange case. The newly cloned MI can be found in the Map. 
![image](https://github.com/user-attachments/assets/d3b47c48-214a-49d9-a106-7759913fe1b4)
![image](https://github.com/user-attachments/assets/4c4fbf02-76cd-4f41-82ae-a96584319f91)
![image](https://github.com/user-attachments/assets/79e573e6-5e16-46d6-854c-5ff79c32534c)
So I added RemoveMachineInstrFromMaps here.

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


More information about the llvm-commits mailing list