[llvm-branch-commits] [llvm] TableGen: Return early from addComposite for known compositions (PR #232815)
Jay Foad via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 16 09:53:21 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 &&
----------------
jayfoad wrote:
I don't understand how `Ins.first->second == B` could fail. Surely if we have already inserted the pair (A,B) then the returned iterator must point to (A,B) ?
https://github.com/llvm/llvm-project/pull/232815
More information about the llvm-branch-commits
mailing list