private static boolean needsNewSuccessor(SsaBasicBlock block, SsaBasicBlock succ) {
    ArrayList<SsaInsn> insns = block.getInsns();
    SsaInsn lastInsn = insns.get(insns.size() - 1);

    // This is to address b/69128828 where the moves associated
    // with a phi were being propagated along a critical
    // edge. Consequently, the move instruction inserted was
    // positioned before the first instruction in the predecessor
    // block. The generated bytecode was rejected by the ART
    // verifier.
    if (block.getSuccessors().cardinality() > 1 && succ.getPredecessors().cardinality() > 1) {
      return true;
    }

    return ((lastInsn.getResult() != null) || (lastInsn.getSources().size() > 0))
        && succ.getPredecessors().cardinality() > 1;
  }
Returns {@code true} if block and successor need a Z-node between them. Presently, this is
{@code true} if either:

<p>

<ul>
  <li>there is a critical edge between block and successor.
  <li>the final instruction has any sources or results and the current successor block has more
      than one predecessor.
</ul>

@param block predecessor node
@param succ successor node
@return {@code true} if a Z node is needed
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/SsaConverter.java