@Override
  public boolean hasSideEffect() {
    Rop opcode = getOpcode();

    if (opcode.getBranchingness() != Rop.BRANCH_NONE) {
      return true;
    }

    boolean hasLocalSideEffect = Optimizer.getPreserveLocals() && getLocalAssignment() != null;

    switch (opcode.getOpcode()) {
      case RegOps.MOVE_RESULT:
      case RegOps.MOVE:
      case RegOps.CONST:
        return hasLocalSideEffect;
      default:
        return true;
    }
  }
{@inheritDoc}

<p>TODO: Increase the scope of this.
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/NormalSsaInsn.java