<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/143363>143363</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DAG] Convert foldMaskedMerge to SDPatternMatch to match (m & x) | (~m & y)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
llvm:SelectionDAG
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RKSimon
</td>
</tr>
</table>
<pre>
Now that foldMaskedMerge has been moved to DAGCombine in #137641, it can be refactored to use SDPatternMatch matchers.
This should allow us to remove foldMaskedMergeImpl entirely and not match all the commutation permutations separately but rely on the commutative SDPatternMatch m_Or/m_And/m_Not/m_Deferred matchers to find the pattern.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkUk1v2zAM_TXyhWhg0x-NDz54MVIMQ7th3b2QLDrWJkuBRKfrZb99kNNiWHsRBZLv8fFDxmhOjqgT9SdRD5lcefah-_7l0SzeZcrrl-7BPwPPkmHyVt_L-Iv0PYUTwSwjKCIHi7-QBvYw9HcHvyjjCIwDgWVR3jZVIfAAhmGUDhRBoEmO7MMVskaCx-GbZKbg7iWPMyzppRB3Iu9F3v-YTYQ4-9VqkNb6Z1hjQgZKdd-r-rycLZBjE8i-gHQanOcrZUIDzwSjX5aVJRvv4Ezh7R8h0lkGyQmpVoaNwrv_MZePep--BoHH5al3erMPnjc70EQh9fnWUZI9Gac3xvOVY5fprtRt2cqMuuK2aqumqosimztqJl3jRKiKqa3LEqVWuMemrhvdlnuVmQ5zrPMmb4sci7rYjVIrWaGcykkp3EtR5bRIY3fWXpadD6fMxLhSV1Rl2ZSZlYps3HaPePJew2RCZNiSBKLAg0BMWFH2j2RpTGMa-rsUq4csdCl2o9ZTFFVuTeT4rxIbtttdpfx6gIN3Fwofr4j9-3myf92XwP0CAhv4LbAFcXtInj9X14vANluD7WbmcxRlL_Ao8HgyPK9qN_pF4HFTfjU35-B_0pj2snUXBR5fp3Dp8G8AAAD___dCAjo">