[PATCH] D118124: [regalloc] Fix assertion error when LiveInterval is empty

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 08:08:35 PST 2022


MatzeB added a comment.

This seems odd to me.



================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:497-500
   if (Matrix->checkInterference(VirtReg, PhysReg) > LiveRegMatrix::IK_VirtReg)
     return false;
 
+  bool IsLocal = VirtReg.empty() || LIS->intervalIsInOneMBB(VirtReg);
----------------
If there are no live ranges in `VirtReg` then why didn't we bail out in the `if` 2 lines earlier? An empty liverange shouldn't interfere with anything. (I am also not sure how you end up with an empty life range in the first place, but I'd first investigate why the interference check did not end up returning `IK_Free` for you)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118124/new/

https://reviews.llvm.org/D118124



More information about the llvm-commits mailing list