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

    <tr>
        <th>Summary</th>
        <td>
            [X86] Avoid spilling whole vectors where only a subvector will be extracted after reload
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:X86,
            llvm:regalloc,
            missed-optimization
      </td>
    </tr>

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

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

<pre>
    An initial attempt was made here: #137316 - performing a subvector partial reload of a larger vector spill store - but that could lead to STLF issues.

What we need to do is perform the extract+store at the spill stage so we're only spilling/reloading the required subvector.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxMUs2OmzAQfhpzGSWCcSDJgQPbFZf21K3UXsd4Am4NpvaQdPv0FSS725Mlz8833w-l5PqJuVblkyqfM1pkCLH--vnFjWHKTLCvdTOBm5w48kAiPM4CN0owkmUYOLLSDSjUhT7qooIdzBwvIY5u6oEgLebKnYQIM8VtR2QfyEK4AIGn2HOER0eanfeQJESGHZhFQAYS6MLiLXgmCxLg5duXFlxKC6e9yhuVN9_XphvDxLx12AAuvV0BMjDwH4nUicKn-3KS7fsNj3qGFODGCo-RIUz-9V5zU6-wvR-80lmHIv9eXGT7wWyf2Vrbsz5TxnVxLEusTkV1yIYaDZdHPhXHU4VnbbCj3BiqymORnwtkylyNOZb5qSiLA57xsK-Mpos52DNjZw2hOuQ8kvN776_jPsQ-26jXRalPhc48GfZpMw_RUPeLJ6t08-NUKUSFnxTiOqh0E7kn70P3_j-6lNjuwixudH9JXJjWWvmcxXqd2ZmlT-qQe5ckfcCLE7-lZcUon6G5Bmff1YLbEDw__ExwW-Nx1_P_JNxW2c27LWyBLsLxkYxsib4eROakdKOwVdj2TobF7LswKmw3QvdnN8fwk1dj23siFLYPZa41_gsAAP__1bz0jw">