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

    <tr>
        <th>Summary</th>
        <td>
            Discussion/Analysis Issue for PR112370
        </td>
    </tr>

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

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

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

<pre>
    [llvm/test/CodeGen/AArch64/andorxor.ll](https://github.com/llvm/llvm-project/pull/112370/files/1b9df39c1d949e8f94a64875c1768c686657c42e#diff-169ee0ea67837e82c5c51c04d7adafa50d5719c4af939da9229a9101d264e082)

Regression caused by https://github.com/llvm/llvm-project/pull/112370.

Root cause?

After the legalizer, we found the combine pattern: unmerge(anyext(buildvector)). It can cause many anyexts for build vectors with many elements.

@aemerson 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykUsFu3CAQ_Rp8QVnBgMEcfNhm5Sq3Kn-AYbymYs0KcJLt11e2I7U5Vr2AxJt5zJv3bCnhuiD2pP1G2ktj1zqn3Nfi5hVrbcbkHxsW49uNwFCxVALDc_L4HRcCw_mc3awkgcEuPuWPlE8xkvZCoJtrvRcizgQGAsM11HkdTy5tNJ9s2_V0z-knuo31vsZIYOAchGYEhilELNvDaPwkjOPeSIPdZKRVstOt41p1TnVKtdpJQALCh2l64sogMrRKd0JjB651LXdMem29nWzLfKu5cdJORhhvDYCxhjPuQUlkHRAwhF0IOx_nK14zlhLSQp1dC3o6Puj_iTt94U-pHsxEDH8D56lipnVGGvFqY_iFmcAzfUc6pXXxO-LSbQwL0rutFfNCxJmuyw3zFQl0dnngRyXQjWuI_g1dTXkTB-ZEX7Y_PxXRm10e9KgudEqZ7g306Cj0PdT5qMGIN1xq-SKASGbxhrmkhTa-F94IYxvsuQbDtADQzdwrpzxwzoVQQmmuWkCFTgjnvEOH0IQeGEjOuOKMaaZPo5Vy8tIpJVuljSeS4c2GeNo2e0r52oRSVuw5h5aLJtoRY9lzDLDgO91RArDFOve7HeN6LUSyGEotf2hqqBH7Syhu3W3eYr3Y-Cih0JeNZF_Jj9fDu2bNsf9n-_dhyhGAbdq3Hn4HAAD__4FnFe4">