anchor.diff:                              %% It is unsafe to use this br,
                               %% because it refers to a variable defined
                               %% in this block.
  -                            shortcut_unsafe_br(Br, Bs, UnsetVars0, St);
  +                            shortcut_unsafe_br(Br, L, Bs, UnsetVars0, St);
                           UnsetVars ->
                               %% Continue checking whether this br is
                               %% suitable.
  -                            shortcut_test_br(Br, Bs#{from:=L},
  -                                             UnsetVars, St)
  +                            shortcut_test_br(Br, L, Bs, UnsetVars, St)
                       end
               end
       end.
   
  -shortcut_test_br(Br, Bs, UnsetVars, St) ->
  +shortcut_test_br(Br, From, Bs, UnsetVars, St) ->
       case is_br_safe(UnsetVars, Br, St) of
           false ->
  -            shortcut_unsafe_br(Br, Bs, UnsetVars, St);
  +            shortcut_unsafe_br(Br, From, Bs, UnsetVars, St);
           true ->
  -            shortcut_safe_br(Br, Bs, UnsetVars, St)
  -    end.
  -
  -shortcut_unsafe_br(Br, Bs, UnsetVars, #st{target=Target}=St) ->
  +            shortcut_safe_br(Br, From, Bs, UnsetVars, St)
  +    end.
  +
  +shortcut_unsafe_br(Br, From, Bs, UnsetVars, #st{target=Target}=St) ->
       %% Branching using this `br` is unsafe, either because it
       %% is an unconditional branch to a phi node, or because
       %% one or more of the variables that are not set will be
  
positive.code:             end
      end.
  
  shortcut_safe_br(Br, Bs, UnsetVars, #st{target=Target}=St) ->
      %% This `br` instruction is safe. It does not branch to a phi
      %% node, and all variables that will be used are guaranteed to be
      %% defined.
  
negative.code:                     %% Try following the success label to see
                      %% whether it also ultimately ends up at the
                      %% forced target.
                      shortcut_2(L, From, Bs, UnsetVars, St);
                  {Target,L} ->
                      %% The success label is the forced target.
                      %% Try following the failure label to see
                      %% whether it also ultimately ends up at the
                      %% forced target.
                      shortcut_2(L, From, Bs, UnsetVars, St);
                  {_,_} ->
                      case Target of
                          any ->
                              %% This two-way branch is unsafe. Try
                              %% reducing it to a one-way branch.
                              shortcut_two_way(Br, From, Bs, UnsetVars, St);
                          one_way ->
                              %% This two-way branch is unsafe. Try
                              %% reducing it to a one-way branch.
                              shortcut_two_way(Br, From, Bs, UnsetVars, St);
                          _ when is_integer(Target) ->
                              %% This two-way branch is unsafe, and
                              %% there already is a forced target.
  