<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58761>58761</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            unnecessary pessimistic implementation of unordered_map and unordered_set
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          egawrilow
      </td>
    </tr>
</table>

<pre>
    As of llvm-15, the search loop in __hash table::__emplace_unique_key_args compares node keys even when hash codes are different, while the find method correctly compares hash codes first.  The fix is trivial: insert ```(__nd->__hash() == __hash) && ``` before ```key_eq()```.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxNUcuSnDAM_Bq4qIYCe2Dg4MMmm3xB7pSxBXhjbNY2Q-bvI9jNTqpUfrRerdbg9UO8RPAjWHtfLlWdse-QZoSIMqgZrPcrGAd9P8s4Q5KDxYy_kPU9LquVCvvNmfcN-9_46GWYIii_rDJgBOc1AsER8I4O9pmOs4wiRwSKAW3GEQO6dPTdZ2Px7D4ap2HBNHtNwSGgSvbxLPxfkdGEmAqAX2fWHzARUjB3Iy1xJOYRQ4KsKT-NtX3v9CXjPz4mIiBjHWT8lQz-YQSwhuyZCAOOnvh-Ace0-P6R_gUWOYqqaW68bRivcy247ngn82SSRbE5hwpjlOEBK91mMTEZBYZ0xIU0kMl4d-xicz5okkX3i1xBkhZPJGLKt2DFnNIaj1Wwn2STSfM2FKQQfY5Vfl6XNfg3Uo--JsYNIz3q9tZU-SyaaznwG8OrKlU5Xm-SjaikKjvdyaHWVW7lgDaKrP6WMeZwh7MEvbP6NTeClYxVVcmqsi55XdxqLBveVmPbSV23PLuWuEhji4NH4cOUB3FSGrYpktPS9PHplCTI5BDPdlRfbrT9IHCSezDW7_nZXJzk_wIGN-KH">