[llvm-branch-commits] [llvm] TableGen: Return early from addComposite for known compositions (PR #232815)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Oct 17 00:56:11 PDT 2026


================
@@ -110,12 +110,18 @@ class CodeGenSubRegIndex {
                                    const CodeGenHwModes &CGH) {
     assert(A && B);
     std::pair<CompMap::iterator, bool> Ins = Composed.try_emplace(A, B);
+    unsigned NumModes = CGH.getNumModeIds();
+
+    // An earlier identical call already added the ranges for every mode, so
+    // there is nothing left to do once B has an offset in all of them.
+    if (!Ins.second && Ins.first->second == B &&
----------------
arsenm wrote:

This was necessary to maintain the ambiguous compose warning, but it seems the warning can be moved 

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


More information about the llvm-branch-commits mailing list