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

    <tr>
        <th>Summary</th>
        <td>
            IR after optimization increases of code instructions
        </td>
    </tr>

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

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

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

<pre>
    The code before optimization is more shorter than after optimization, when I use -O1 code looks correct, but when I use -O2 -O3 looks so bad, for example GCC don't have this problem

Example: -O1
https://godbolt.org/z/9nq3hd8ve

After use -O2 or -O3
https://godbolt.org/z/xYeKzveze
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMkU-P2yAQxT8NvowSEfDfAwd3W1erHlaqeukRzCTQYpMyOLvNp69Ituof9dCTLeY37z14msifVkTFmjeseVvpLbuYVOI8c6pMtN_VJ4cwR4tg8BgTQjxnv_irzj6u4AmWckgupowJstMr6GP5_Z1j4gGeHa7wCBsh7J4Od8kQ41eCOaaEcy6Q2fKfoIDdk3zlKILRtmDHmABf9HIOCO8fHsAWiy6D0xeE7DzBOUUTcGF8ZHx8d0eZHIs146PL-UxMjkxMTEynaE0MeR_TiYnpysQ0rN-ks_0F7_vj7UI_A8VUMv2Hystn_HC94BUrq6Qd5KArVIeuOdR1w3lXOSVFK6Tt6qHuG4v90NWDbq3lvdAN58NQeSW4aHjHBe8l593eGNSmlabuh3luhWQ1x0X7sA_hshTvyhNtqA5129Z9FbTBQLd2hVjxGW5TJkQpO6mytDPbiVjNg6dMv2SyzwHV48d_tAl-nRNqQoJ4vBfpV8ppm8uUqi0F9dfb-Ow2s5_jwsRULF4_u3OKX27VT7dgxMT0mvyixI8AAAD__1qU2MQ">