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

    <tr>
        <th>Summary</th>
        <td>
            Missed coalescing of adjacent writes to stack variables
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Bryce-MW
      </td>
    </tr>
</table>

<pre>
    Here's a simple reproduction: https://godbolt.org/z/5dza4c787 (should be `mov qword ptr[rsp], 0`). I know that LLVM can coalesce known adjacent writes. The problem here is that these variables are not known to be adjacent until stack slot allocation which I know happens during target code generation so this isn't solvable at the IR level. I suspect that means that the solution would have to be per-target (currently, I can reproduce this on every arch that compiler explorer has though I am not proficient in non-x86_64 asm so I could be wrong).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxck82OozgQx5_GXEqJwAQIBw7TO4o20vRltdo9rgpTwZ4xNusySaeffmRIuqU-cbCq6vf_AJnN6Ig6Ub2I6nuGS9Q-dC_hrmj3-m_W--He_UmBhGwYENhMsyUINAc_LCoa70T5DXSMM4vym5AnIU-jH3pv496HUcjTu5CnanjHg2qODQh5ZO0XO0BPIOp88lf4_-bDAHMMonoJPIvqu5B_QC7qXMh2D2f45fwNosYIP3788woKHSiPlljR-uYAh5-oyEW4BROJ9_C3JpiD7y1NoCkQGN42RE1McMVgsLfEgIHA-fjYE33i-ti2uGgscET1C9j6CGitV5hkw00bpZ9wGueZHMOwBONGiBhGiqD8QDCSo7CNsIeoDYNhJ2QTgb29JgrYuOD8F1i6kk2aeeGZVNygJ0L3yZ_mlo1hdVLjlR7kM4Xd47iQR7WEQC7ae_LzvPr2TI42Eu-ArhTugEHp7YDy02wsBaC32fpAATSm234Zk1ycVrvm4C9GmWSSceC8270d6__qAyBPSecZ1DPlW_BuTElmQ1cObdliRl3RFFUt87oqMt1VjTpWFWKLLcrDkeSlGZq6rEgey6Gt88x0MpeHvCrKoimastjXeCmGC5V90RLm2ItDThMau7f2OqXiZYZ5oa6VeZ5nFnuyvHZcSkc3WB-FlKnyoUszu34ZWRxyazjy55ZooqXu1TDT8OxcCthfvlYuBbAV5aNb2RJs9-XXMFEv_V75SchTuvL47Obgf5KKQp5WNhbytLL_DgAA___GMTyX">