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

    <tr>
        <th>Summary</th>
        <td>
            [SVE] necessary write is dropped
        </td>
    </tr>

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

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

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

<pre>
    Godbolt: https://godbolt.org/z/5cjfqh6K1

When `WANT_BUG` is `0` everything works as expected.
When `WANT_BUG` is `1` result of `rng.Fill` is dropped, consequently result is undefined garbage.

Compare disassembly of `nevermind::N_SVE2_128::BugCore(unsigned int, unsigned long)`; when `WANT_BUG` is `0` it is 3 instructions longer; 2 of those are calculating the result (`add   z4.d, z2.d, z3.d`) and storing it (`st1d        {z4.d}, p0, [x8]`).
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8kr1yozwUhq_m0GjCiAMYKCjsOKT4ZtLk26TMCHQMysoSkUQc5-p3hJ3dnS3SoD8e8fDOK7xXoyFqodxBuU_EEibrWlp8ED7prTy391b2VgfIt2wKYfaQbwE7wG68HKTWjYDdJ2BXDq-Ht2nzXwZ8C3z7PJFhsOHP24f_X3Y_7mHDmfJxh8cpvZM7h0mZkZ2s--mZ8Iw-ZhoCyfRbPItTR37RgdlD3HFmTDul9fUd6ew8kwS8ZYM1nt4WMkGfvxjl2WIkHZQhyUbhejFSenG-tcdZOGJSeeE9HXt9vn7CRN-jMjIGkG8fXh6f7vAlw_qy3i3jrXUEWC9mzVQyZUI0-L3W1oyADWw45Dt2-j4dtWrmTBkf3DIEZY1fbyAXaYxWYbKeWNQdhB4WLUIMM0z09aOANWy4kBJ481mkayCfeB3zVEYVbJgwkvlgXaTVF-VDFjGoditZ7SM08_iEcvdRQ7m_4Gki21w2eSMSarMqL_McsebJ1GYbwQmpQipEWfaHoS4yKQ4Nr_PyUNdVolrkWGSIFfKiKHi6yYe-l0JQJRvZ1BIKTkehdKr1-zE2LVHeL9RmmCE2iRY9ab-WF9HQia2ngBi77NoI3fTL6KHgWvng_1wTVNBr6x-f7qDcM0MDeS_cmZ2cCvRXiZLF6faf5qswLX062CNgF6-8Djezs680BMBuFfGA3dX0vcVfAQAA__9CpBBa">