<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [InstCombine] Failure to simplify A|B|(A^B) --> A|B"
href="https://bugs.llvm.org/show_bug.cgi?id=52479">52479</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[InstCombine] Failure to simplify A|B|(A^B) --> A|B
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jay.foad@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>InstCombine should simplify A|B|(A^B) --> A|B.
Here's CompilerExplorer showing that (a) the transformation is valid according
to Alive2, and (b) "opt -O3" does not do it:
<a href="https://alive2.llvm.org/ce/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAM1QDsCBlZAQwBtMQBGAFlICsupVs1qhWrAG4BbUgGdM7ZATx1KmWugDCqVgFcptLgFZS69ABk8tTADl9AI0zEQANlIAHVLMIra2vQbGHl4%2BdJbWdlKOzm7yisp0DATMxAT%2B%2BoacJnGYSr5JKQThtg5OrnLJqemBWRWFxZHRrgCUcqi6xMgcAORYVFaYANR43IMAAgTABBAjgwCkAExGAAykw6OLRpzN8wDsAEJzywCC9vYgR8eD80sL8wDMACKDJOs3W2uby5fXxJgEb02C0uc12j0ufQGbzGsk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cqi6xMgcAORYVFaYANR43IMAAgTABBAjgwCkAExGAAykw6OLRpzN8wDsAEJzywCC9vYgR8eD80sL8wDMACKDJOs3W2uby5fXxJgEb02C0uc12j0ufQGbzGsk6Mw2S1WgKW2z2hxOZwuJ2uQIez1es02nE%2BiJ%2B73ueMGAA8CQiPu9vtj3hsni9iMijAsSUZ7mS/gDCUtuCCwZduq1WCBukZuqRDN1lrLUFLzOYAGoAWUGAEkAEqDWTtTpDRb3TiyghSxXNVoAaxAKyEUu4svlitIyu6stkIFWloV4tIcFgMEQKFQUnceHYZAoEDQkejZVQ7gIpH6rAITh9EHOAdI9isKQAnlLzaQE1J1AQAPK0Vil/NYKQiYDsK2y/B/PISTA%2B/OYKm5XRZsuyqxZyX51h4ezEEvaLBj0gEYh4KRj1o0ehMNgcHj8QTCUQgcTSISzn2QVophK0fsAWhrC29Clyd7UGmqmVMGgapWcYlPG8O9v0EYDQlof8ojKYkcjyRJKjSHQMkEeC7wKVJoKaOCkLA3D6gGRpYNaQ0Oi6LgJSlGU5Q7D0pVvQYIFwQhXlNYlBm0RMYxuM0dlVTUdV1C0OxtUgEEwZgsGcCA7QdVYpxdUgN0dN0lSlb1fRXUSg1DCAkATKMY3IShDKTZw2DwXt02jLNiBzPN3ULWgS2XStqzrBs6ObVt2ybPBu2UXt%2B3dQdh1HbpywnBQ6JnOcFwwHpy1XddN3TOhGBYdsDwELljzESQZDiq9ZI9VNfH7V94l8T8tBQmpfwsIiAPAkJQPqn8ILvbDYLkN8ENoTDkICH90PyJCesAuoqg6tCJuamDANIo0KO2J1pVdOjPUs3sHwICQmJYoh2XYtYuKMpxeIWfj1S1PURIDMSJKkspSsU2UVNWNT6K9OQtP9a05MdKd7k2/NPQewH1pfWjwY07THtaXt7Jq7ggA%3D</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>