anchor.diff:              %% since the intersection will be empty.
               cse_successors_1(Ls, Es0, M);
           #{L:=Es1} ->
  -            %% Calculate the intersection of the two maps.
  -            %% Both keys and values must match.
  -            Es = maps:filter(fun(Key, Value) ->
  -                                     case Es1 of
  -                                         #{Key:=Value} -> true;
  -                                         #{} -> false
  -                                     end
  -                             end, Es0),
  +            Es = cse_intersection(Es0, Es1),
               cse_successors_1(Ls, Es0, M#{L:=Es});
           #{} ->
               cse_successors_1(Ls, Es0, M#{L=>Es0})
       end;
   cse_successors_1([], _, M) -> M.
  +
  +%% Calculate the intersection of the two maps. Both keys and values
  +%% must match.
  +cse_intersection(M1, M2) ->
  +    if
  +        map_size(M1) < map_size(M2) ->
  +            cse_intersection_1(maps:to_list(M1), M2, M1);
  +        true ->
  +            cse_intersection_1(maps:to_list(M2), M1, M2)
  +    end.
  +
  +cse_intersection_1([{Key,Value}|KVs], M, Result) ->
  +    case M of
  +        #{Key := Value} ->
  +            cse_intersection_1(KVs, M, Result);
  +        #{} ->
  +            cse_intersection_1(KVs, M, maps:remove(Key, Result))
  +    end;
  +cse_intersection_1([], _, Result) -> Result.
   
   cse_is([#b_set{op={succeeded,_},dst=Bool,args=[Src]}=I0|Is], Es, Sub0, Acc) ->
       I = sub(I0, Sub0),
  
positive.code: %%%
  
  ssa_opt_cse({#opt_st{ssa=Linear}=St, FuncDb}) ->
      M = #{0=>#{}},
      {St#opt_st{ssa=cse(Linear, #{}, M)}, FuncDb}.
  
  cse([{L,#b_blk{is=Is0,last=Last0}=Blk}|Bs], Sub0, M0) ->
  
negative.code: cse_suitable(#b_set{op=put_list}) -> true;
  cse_suitable(#b_set{op=get_tuple_element}) -> true;
  cse_suitable(#b_set{op=put_tuple}) -> true;
  cse_suitable(#b_set{op=get_map_element}) -> true;
  cse_suitable(#b_set{op=put_map}) -> true;
  cse_suitable(#b_set{op={bif,tuple_size}}) ->
      %% Doing CSE for tuple_size/1 can prevent the
      %% creation of test_arity and select_tuple_arity
  