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

    <tr>
        <th>Summary</th>
        <td>
            InstCombineCompares 
        </td>
    </tr>

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

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

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

<pre>
    


This has the side-effect of converting a post-inc IV into a pre-inc IV. LSR has the ability to rectify this, but it's use of SCEVExpander can only do so by inserting instructions into the pre-header. A similar issue (https://github.com/llvm/llvm-project/issues/54558) was fixed by https://github.com/llvm/llvm-project/commit/5f8c2b884d4288617138114ebd2fdb235452c8ce - but I'm hesitant to apply a similar fix here unless it is the only option.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyckk9v2zwMxj-NfCESWLKU2Acf8qYNUOA9rUPv-kPHHGzJEOW2-faD067bdbtIAAE-fJ4faZnpGhF7Yf4T5qGyaxlT7p8XjB7zyXGKlUvh1ov6QdSnP9_vIzGMlqGMCEwBdzgM6AukAXyKr5gLxStYWBKXHUUPTy9AsaStlPGzsof_n799yVhHE5UblAQZfaHhBmUkFuoMbi1ARagjw8q4DXk-P748vi82BszgbYQUpxuEBJzA3YAif1qgyCWvvlCK_OFgm7V5GNEGzHs4AdNMk81AzCuCUO1YysKiOQl1EepypTKubu_TLNRlml5_fbslpx_oi1CXeycLdTHamFaoDt4sw0DvGDY7f63n0zxvgS9maL1ybauDVm17kEfZtFJqdEENwanGaKN86xF2d0hPQh1nGJGp2Fg2lHZZphvYr4wDvcOIGWGNEzIDFaAP_neCadlI7avQN6FrOlthL4-NrI_G6KYa-84rEw4NyuPx0KEZtNRGH3yrQ9NJdzhU1KtaaSnrVmrZ1c0eG-W08c63WmFolNA1zpam_RZ5n_K1usPrpTS6PVSTdTjx_SSVivj2sRSh1Hahub9zcuuVha4n4sK_ZQqVCfunyOWcZkcRz2lebEaGas1T_-87_XT22qufAQAA__9G4AsW">