Goto.setTarget(g, Goto.getTarget(targetInst));
Goto.setTarget(g, (OPT_BranchOperand)Goto.getTarget(targetInst).copy());
  private boolean processGoto(OPT_IR ir, OPT_Instruction g,                               OPT_BasicBlock bb) {    OPT_BasicBlock targetBlock = g.getBranchTarget();    // don't optimize jumps to a code motion landing pad     if (targetBlock.getLandingPad()) return false;        OPT_Instruction targetLabel = targetBlock.firstInstruction();    // get the first real instruction at the g target    // NOTE: this instruction is not necessarily in targetBlock,    // iff targetBlock has no real instructions    OPT_Instruction targetInst = firstRealInstructionFollowing(targetLabel);    if (targetInst == null || targetInst == g) {      return false;    }    OPT_Instruction nextLabel = firstLabelFollowing(g);    if (targetLabel == nextLabel) {      // found a GOTO to the next instruction.  just remove it.      g.remove();      return true;    }    if (Goto.conforms(targetInst)) {      // unconditional branch to unconditional branch.      // replace g with goto to targetInst's target      OPT_Instruction target2 = firstRealInstructionFollowing(targetInst.getBranchTarget().firstInstruction());      if (target2 == targetInst) {        // Avoid an infinite recursion in the following bizarre scenario:        // g: goto L        // ...        // L: goto L        // This happens in jByteMark.EmFloatPnt.denormalize() due to a while(true) {}         return false;      }      Goto.setTarget(g, Goto.getTarget(targetInst));      bb.recomputeNormalOut(ir); // fix the CFG       return true;    }    if (targetBlock.isEmpty()) {      // GOTO an empty basic block.  Change target to the      // next block.      OPT_BasicBlock nextBlock = targetBlock.getFallThroughBlock();      Goto.setTarget(g, nextBlock.makeJumpTarget());      bb.recomputeNormalOut(ir); // fix the CFG       return true;    }    if (mayDuplicateCondBranches && IfCmp.conforms(targetInst)) {      // unconditional branch to a conditional branch.      // If the Goto is the only branch instruction in its basic block      // and the IfCmp is the only non-GOTO branch instruction      // in its basic block then replace the goto with a copy of       // targetInst and append another GOTO to the not-taken      // target of targetInst's block.      // We impose these additional restrictions to avoid getting       // multiple conditional branches in a single basic block.      if (!g.prevInstructionInCodeOrder().isBranch() &&           (targetInst.nextInstructionInCodeOrder().operator == BBEND ||           targetInst.nextInstructionInCodeOrder().operator == GOTO)) {        OPT_Instruction copy = targetInst.copyWithoutLinks();        g.replace(copy);        OPT_Instruction newGoto =           targetInst.getBasicBlock().getNotTakenNextBlock().makeGOTO();        copy.insertAfter(newGoto);        bb.recomputeNormalOut(ir); // fix the CFG         return true;      }    }    // try to create a fallthrough    if (mayReorderCode && targetBlock.getNumberOfIn() == 1) {      OPT_BasicBlock ftBlock = targetBlock.getFallThroughBlock();      if (ftBlock != null) {        OPT_BranchOperand ftTarget = ftBlock.makeJumpTarget();        targetBlock.appendInstruction(Goto.create(GOTO,ftTarget));      }           ir.cfg.removeFromCodeOrder(targetBlock);      ir.cfg.insertAfterInCodeOrder(bb,targetBlock);      targetBlock.recomputeNormalOut(ir); // fix the CFG      return true;    }    return false;  }