================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to