<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> it&#39;s not an optimization, it&#39;s a legalization (match/assign are not made of gates), and it&#39;s not at all clear that it&#39;s incorrect</p><p>what happens is that the match legalizer builds this decision tree:</p><p>%0+0 = 0 =&gt;<br /> %0+1 = 0 =&gt; %_5<br /> %0+1 = 1 =&gt; %_8<br />%0+0 = 1 =&gt; %_8</p><p>and then implements it by using `eq` on the inputs. `eq` outputs X if there are any X in the inputs and the comparision isn&#39;t apriori false (i.e. doesn&#39;t have non-X input bits that disagree)</p>
Reply