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

    <tr>
        <th>Summary</th>
        <td>
            SLP Vectorizer discards vector entries at unknown positions
        </td>
    </tr>

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

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

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

<pre>
    SLP Vectorizer can discard vector entries at unknown positions. This example shows the behaviour:

https://godbolt.org/z/or43EM594

The following instruction inserts an element at an unknown position:

```
%2 = insertelement <3 x i64> poison, i64 %value, i64 %position
```

The position depends on an argument that is unknown at compile time.

After running SLP, one can see there is no more instruction present referencing `%position`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkk9vnDAQxT-NuYyCwOZP9sAhTcIplSIl6t2Y2cWt8SCP2U3z6SvTTbra9lAJgT3Y7_3GfprZHjxiJ-ovon7I9BonCt1MM9V1IbOBxp_dy9MzfEMTKdh3DGC0h9Gy0WGE41YG9DFYZNARVv_D08nDQmyjJc85vE6WAd_0vDgEnujEECeEASd9tLQGoe5E8SCK83uKceFUk72Q_YHGgVzMKRyE7N-F7ClU6vFrvasuN71OCHtyjk7WH8B6jmE1yT-NMUQG7QEdzuhjwtT-L9IrDNEU5-f3VNYShHo4631ICXWv4A1sUwn1CAtZJi_kfSqAkPVRuxUv5p9e_7T47ORjGYy4oB8ZyCdiHQ7r5honHcHyZws6gqF5sQ4h2hnzS727fcQAYfU-nczL03PCIY_bPTJiuouASc0TzJSGF6e3BOTkGHCPAb1JGgn4opWmyLOxU-NO7XSGXdkWsla7siizqdu3at_sKrMvZHMrK9S1HpUuS6XrsjRyzGwnC6lKWVZFq8qqzDU2t0PZ1o00bSPNKKoCZ21d7txxTinILPOKXVtXqs2cHtDxll4pPZ5g-ymkTGEOXdpzM6wHFlXhLEf-oxJtdHgd7XOs-X9yna3BdVdZtXFah9zQLGSfnM6fmyXQdzRRyH7jYyH7jf9XAAAA__9A7iIj">