@@ -5834,23 +5834,23 @@ defmodule Module.Types.Descr do
58345834 # Dual: (D1 and not D2 and not U2) or (U1 and not D2 and not U2)
58355835 #
58365836 # We can optimize the cases below.
5837- cond do
5838- c2 == :bdd_bot and d2 == :bdd_bot ->
5839- # Constrained = (C1 and not U2) or (U1 and not U2)
5840- # Dual = (D1 and not U2) or (U1 and not U2)
5841- # Hence:
5842- { lit , bdd_difference ( c1 , u2 ) , bdd_difference ( u1 , u2 ) , bdd_difference ( d1 , u2 ) }
5843-
5844- u1 == :bdd_bot or u1 == u2 ->
5845- # Constrained = (C1 and not C2 and not U2)
5846- # Dual = (D1 and not D2 and not U2 )
5847- # Hence:
5848- { lit , bdd_difference_union ( c1 , c2 , u2 ) , :bdd_bot ,
5849- bdd_difference_union ( d1 , d2 , u2 ) }
5850-
5851- true ->
5852- { lit , bdd_difference ( bdd_union ( c1 , u1 ) , bdd_union ( c2 , u2 ) ) , :bdd_bot ,
5853- bdd_difference ( bdd_union ( d1 , u1 ) , bdd_union ( d2 , u2 ) ) }
5837+ if u1 == :bdd_bot or u1 == u2 do
5838+ # Constrained = (C1 and not C2 and not U2)
5839+ # Dual = (D1 and not D2 and not U2)
5840+ # Hence:
5841+ { lit , bdd_difference_union ( c1 , c2 , u2 ) , :bdd_bot , bdd_difference_union ( d1 , d2 , u2 ) }
5842+ else
5843+ c =
5844+ if c2 == :bdd_top ,
5845+ do: :bdd_bot ,
5846+ else: bdd_difference ( bdd_union ( c1 , u1 ) , bdd_union ( c2 , u2 ) )
5847+
5848+ d =
5849+ if d2 == :bdd_top ,
5850+ do: :bdd_bot ,
5851+ else: bdd_difference ( bdd_union ( d1 , u1 ) , bdd_union ( d2 , u2 ) )
5852+
5853+ { lit , c , :bdd_bot , d }
58545854 end
58555855
58565856 { :eq , _ , { lit , c2 , u2 , _d2 } } ->
0 commit comments