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

    <tr>
        <th>Summary</th>
        <td>
            clang x86 Missed optimization when directly returning pair vs copy ellision
        </td>
    </tr>

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

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

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

<pre>
    [Godbolt link](https://godbolt.org/z/G86T3GEvs)

Looking at the output we can see that the first version generates 2 more instructions and according to llvm-mca takes quite a bit longer (3028 vs 2283).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUctu4zAM_Br7QjSQ5Ufsgw9ZdJtLe9r9AVmibTWy5Ep0sunXL50WWGABPUgNNJwhh2DufVb_OAczBEfgrL9k9XMm25loTVl5yuQLr-kLP4Q4cfbJ-9w2v8vzz2vKZJeJ50ycvs7XEC7WT6AIaEYIG60bwQ1BKw8JkV-_odHGRHDFmGzwMKHHqAgTSFhCRLA-Udw0MZhAeQNK6xDNzk0BnLsuT4tWQOrCfz42SwgKBssegp8wAnsohWzhyowcssxDjn3RNEVXl1Urc9OXpis7lZMlh712iqn_tA282ZTQQFjJLvZT7QrgNqMHYyNqcneISFv0u5RV2biX0GG9AzpndzP5Fl3_XwMtzdtw0GHhZBf_fT2tMbwzKadcdUNu50t9rI5dPveNak2Ng6n0YIZ6VLpBKcaqEqMSKI4qd2pAl_b5ZVJ6vMGDgmMeYW57KaQUbVkUZVVV8iCl1kJ1pjDt2KDpskrgoqw77Dr2yeaxf0gatikxyF4o_QNVSnbyiI9yzK82mkPsT2-_ZJE_CvcP4X8B2RDDWw">