<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/113425>113425</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`slp-vectorizer` miscompiles when shuffling and vectoring many ops
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bongjunj
</td>
</tr>
</table>
<pre>
Alive2 report: https://alive2.llvm.org/ce/z/y-pAyx
```llvm
----------------------------------------
define <2 x i8> @g.2(<2 x i8> %x, <2 x i8> %y) {
#0:
%x0 = extractelement <2 x i8> %x, i32 0
%y1 = extractelement <2 x i8> %y, i32 1
%x0x0 = mul i8 %x0, undef
%y1y1 = mul nsw i8 %y1, %y1
%ins1 = insertelement <2 x i8> undef, i8 %x0x0, i32 0
%ins2 = insertelement <2 x i8> %ins1, i8 %y1y1, i32 1
ret <2 x i8> %ins2
}
=>
define <2 x i8> @g.2(<2 x i8> %x, <2 x i8> %y) {
#0:
%#1 = shufflevector <2 x i8> %x, <2 x i8> %y, 0, 3
%#2 = mul <2 x i8> %#1, %y
ret <2 x i8> %#2
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
<2 x i8> %x = < #x00 (0) [based on undef value], poison >
<2 x i8> %y = < poison, poison >
Source:
i8 %x0 = #x00 (0)
i8 %y1 = poison
i8 %x0x0 = #x00 (0)
i8 %y1y1 = poison
<2 x i8> %ins1 = < #x00 (0), #x00 (0) >
<2 x i8> %ins2 = < #x00 (0), poison >
Target:
<2 x i8> %#1 = < #x00 (0), poison >
<2 x i8> %#2 = < poison, poison >
Source value: < #x00 (0), poison >
Target value: < poison, poison >
Summary:
0 correct transformations
1 incorrect transformations
0 failed-to-prove transformations
0 Alive2 errors
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8Vs1uqzoQfpphY6Uy45DAgkV60myv1HtewIGBuAIb2SYN5-mv-ElaUnqb1YkiQsz3zd83gy2dU6UmSiF6hmgfyNafjE2PRpdvrX4Ljibv0l2lzoTMUmOsB7FjJ-8bB2IHeAA8yOHxU1Wd6ydjS8BDRoCHP4CHbtXsugvwPfDddN3w8dvDx6XVg58RnVOhNDEQv5BdmIpBvDBY8_IJAeP5KkYXwF_sfrEDTBhsn6eAUPA-leEPG0icgdgzungrM08V1aT9FyuDaSWQ8U_ULnyE2l2p4czr5LduK6bicakHtjqnYuZj8tIDtXufwF045DrcfICVdiNYaUd2OaLRQR9SfA1kKTelHf5kavL4YawP9ku2lhZpOAmy3U83Yg_i5W-pDijGSrlTWxQVnSnzxi7LvijoUDQxt4g3oe4pvburYP9Xl97IXV1-W6ldYWwtvTKa5YacBtx6diarig4w_DxwL6-v_7z2Q_tb2pI8U47VxhJrjHJGm9Yxf5KaOdPajGbEi6ybim5V-lKJITcQfQ7iwjkDjDlgAjyB6PkoHeXM6LG72FlWLUG071MePbObtl-qeTM8Ihc5w_XfMehrhNf-Hfl3QX0ApvGZjM-YD3AX2Esj8F1x8H7l-zrcBm7ZzHJJRpW_Fe3W5Q_aXOjGB9QZdZlEF7sHnU0NOmP92AFtXUvbfRplzjJjLWWe-dmcuCsgZEr_AOGskKqifOXNqrHmTN8Dp72RrDXW3W1xQZ6KPBGJDCgNt5hstnwTbYJTGiZFnBVSyFxilGx5wmOR5IkUOY9RUhSoFDmuQ46Cx3wdRk9ZHm0pkZsYI9wWxw2sOdVSVbddN1DOtZSGoVhjFFTySJUbNnVETe9seAqI_R5v0560OralgzWvlPPuw4xXvqIUNtxVzWp8B6o_ZGHDWa1cZupGVeTY-4n09KZUumRS52wC65LVUnfMNC5obZXOzwql8qf2-JSZGvAwHAHGn77Mb5R5wMMQqgM8TLmcU_wvAAD__zYOVO0">