[llvm] [TableGen] Fix concatenation of subreg and artificial subregs (PR #114391)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 03:20:17 PDT 2024


================
@@ -411,6 +410,9 @@ CodeGenRegister::computeSubRegs(CodeGenRegBank &RegBank) {
         Parts.push_back(getSubRegIndex(SR->ExplicitSubRegs[j]));
     }
 
+    if (Parts.size() < 2)
+      continue;
----------------
jayfoad wrote:

Shouldn't we `continue` here if _any_ of the subreg indices of SR are artificial? (Either instead of or as well as the `Parts.size()` condition.) E.g. if SR had _two_ real subreg indices and one artificial one, we should give up?

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


More information about the llvm-commits mailing list