<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62113>62113</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Missing fold for (a | b) ? (a | b) : b --> (a | b)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
Test program:
```c
int foo(int a, int b)
{
return (a | b) ? (a | b) : b;
}
int bar(int a, int b)
{
return (a | b);
}
```
Godbolt (clang vs gcc):
(x86_64) https://godbolt.org/z/xfdzaj3c3
(Arm) https://godbolt.org/z/W9o3bWaa6
I'm not familiar with alive, but I tried using it.
https://alive2.llvm.org/ce/z/pyvgZX
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykks1unDAQgJ9muIx2hcesFw4cNkmpcuitUqpeKtsY1qnBK9tsfp6-gv1p0vYQqRISA8M334wZGaPtR2Nq2NzA5i6TU9r7UP9cyRD8U8yUb1_qryYmPATfBzkA30F-B_kORH669OnZjgk774HKOZJAtzgHCqg6A9ubU4CIGEyawohApUTY3i6fIfDmrzc7VMBvLhXuzsHVqGT4D-M_Kl-meiv67FvlXZpZ7eTY4zFir_VS4HIaVD6X4oco5q73KR3inKIGqOlP9NqHHqh5BWqeu_ZVPnLNr-wuDB8BHyrP1YOU4m1390DbAUefsJODdVYGfLJpj9LZo5kPRU0J7zEFa1qcoh17tGl9Yt8LF4LWzh2Hs1Sbs_nwcuy_f8vamrcVr2RmaiZKxkVJFcv2ddcWJheq4kwYLQu2pVIYrjcdY7zQrchsTTnxvGA8F0WxYWslOiE0UxXlbWUKBkVuBmnd1Z7ZGCdTC2KMZ04q4-KypESjecIlCUTzzoZ6ZlZq6iMUubMxxd9Vkk3O1F9sXAbvvGux8-Fji4erFfBP7zPZFFz9x3-yaT-ptfYDUDOLz7fVIfhHoxNQs7QbgZplnF8BAAD__1oC-uE">