<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59196>59196</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Instcombine] Need to check one-use for the combination in foldAndOrOfICmps
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:instcombine
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bcl5980
</td>
</tr>
</table>
<pre>
https://godbolt.org/z/66hxefsvh
```
define i1 @src(i8 %x, i8 %y) {
%cmp1 = icmp ne i8 %x, 0
%cmp2 = icmp ne i8 %y, 0
%or = or i1 %cmp1, %cmp2
%r = select i1 %or, i1 %cmp2, i1 %cmp1
ret i1 %r
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtksFu6yAQRb8Gb1AjwAGbBYu0UaVu2m8wMI5piYkAV02__mE7eU2jSljMwJmruWN0sGc15HxKqN4h9lzWIVgdfN6EeCjZd_mEGL6gT58DIntEdkiQy1pSC70bATuK0ZakaBBrXYsR41-IPeE1PCMmMWoe1wo8H5njqVTUe-xKhGeBnyLym2N_cOd7LsSFKtvcyao_MxeJG3IFE3gw-QKHuPRK_9O3Gb3WRrjy8TKJZo_vZlKBokLIWlBOeGVVbWUtuyq77EEh_vgypmzCUZeRIb7HrwAW54DNAOYDhxEepgS4Ly7yAHgFu-zCiN1Yjr3djfYtvvUvT8dTqqbo73-ey8OkN6WwJN5_XreHUwzvxW9JXUoTpBJwSaWoBrWVnEqrZUtZD0ZbwgU1LWybrus13drKdxp8mrtHjC2i9c7d-GCsWKmcYoQxShknTU3rdsOFaDnpm85qQ9pGlOcBx875zSwxP68qqqU3PR1SufQu5fRz2aXkDiMsU5v1uykPISptPJctqRYbavHwD-6EzLs">