[llvm] [TableGen] Complete the support for artificial registers (PR #183371)

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 09:34:37 PDT 2026


================
@@ -2444,6 +2488,8 @@ void CodeGenRegBank::inferMatchingSuperRegClass(
     TopoSigs.reset();
     for (const CodeGenRegister *Super : RC->getMembers()) {
       const CodeGenRegister *Sub = Super->getSubRegs().find(SubIdx)->second;
----------------
kosarev wrote:

Still builds fine for me with this assert added:
```diff
     for (const CodeGenRegister *Super : RC->getMembers()) {
+      assert(Super->getSubRegs().find(SubIdx) != Super->getSubRegs().end());
       const CodeGenRegister *Sub = Super->getSubRegs().find(SubIdx)->second;
```

> But this problem goes away if I fix the "find" issue I made a comment about earlier.

Does it crash without this fix but with https://github.com/llvm/llvm-project/pull/185448 applied?


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


More information about the llvm-commits mailing list