<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> it's not an optimization, it's a legalization (match/assign are not made of gates), and it's not at all clear that it's incorrect</p><p>what happens is that the match legalizer builds this decision tree:</p><p>%0+0 = 0 =><br /> %0+1 = 0 => %_5<br /> %0+1 = 1 => %_8<br />%0+0 = 1 => %_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't apriori false (i.e. doesn't have non-X input bits that disagree)</p>