<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106256>106256</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Ineffectual por with constant emitted for pshufb operand
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cvijdea-bd
</td>
</tr>
</table>
<pre>
Clang example: https://godbolt.org/z/darfTE6EP
The `por` of xmm1 with 112 (`0b0110_0000`) in the assembly emitted for `saturating_shuffle_masked` is a no-op, as pshufb ignores bites 5-7 of the mask argument:
```
.LCPI2_0:
.zero 16,15
.LCPI2_1:
.zero 16,112
saturating_shuffle_masked:
pand xmm1, xmmword ptr [rip + .LCPI2_0]
por xmm1, xmmword ptr [rip + .LCPI2_1]
pshufb xmm0, xmm1
ret
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01vozAU_DXm8pTIfuErBw5tWqRKe-ih98jgB7hrbGSbfv36lZOo3XR3pUUIC5jxzBuNZQh6tEQNK25ZcZfJNU7ON_2LflYkN53KOqfem4ORdgR6k_NiiO1uYIpxCWx3w7Bl2I5Odc7ErfMjw_aDYaukH57uy_tHxu8Yvzk_nyYCVvLFeVZycAO8zbOAVx0nEAKBYc1KzjsuBD9yzjkrOcM9aAtxIpAh0NyZd6BZx0gKBufTdkHG1cuo7XgM0zoMho6zDD9JJREdQIJ1G7cwPIAMsCRMB3q0zlOATkcKUGyqZCepJCpIP64z2ZgG_M1_8nO-T6_bH4fHBzzyTxRcru0HeQcAomR4EMUVWnyhr2ECz5__Pc53mUValdaUYprubZ5fnVewRA-suPV6AYa38GmzuPvGdx7-ny_-5J-jTDx-4YtrhKf41-Qy1ezUfreXGTWiwryqeZXn2dTssBtUWVT1UKqdKvtSVmXey1rtVV0UNc90gxxzXmMlqrzId1tVVyrfd1ySqIai6lnOaZbabI15mVMhMx3CSo3gJRZlZmRHJpzajmjpFU5_GWIqv28SadOtY2A5NzrE8LVN1NFQ82BpGKiPqzSn_E7l7Z0NUdp41cxLOm4hL63KVm-ab4dGx2nttr2bGbZJ5rJsFu-eqY8M25O5wLC9uH9p8FcAAAD__2RRGKU">