s.insertBefore(MIR_Branch.create(IA32_JMP, target));
s.insertBefore(MIR_Branch.create(IA32_JMP, (OPT_BranchOperand)(target.copy())));
  private static OPT_Instruction fp_ifcmp(OPT_Instruction s, OPT_IR ir) {    OPT_Instruction nextInstr = s.nextInstructionInCodeOrder();    OPT_Operator op = s.operator();    OPT_BranchOperand testFailed;    OPT_BasicBlock bb = s.getBasicBlock();    OPT_Instruction lastInstr = bb.lastRealInstruction();    if (lastInstr.operator() == IA32_JMP) {      // We're in trouble if there is another instruction between s and lastInstr!      if (VM.VerifyAssertions) VM._assert(s.nextInstructionInCodeOrder() == lastInstr);      // Set testFailed to target of GOTO      testFailed = MIR_Branch.getTarget(lastInstr);      nextInstr = lastInstr.nextInstructionInCodeOrder();      lastInstr.remove();    } else {      // Set testFailed to label of next (fallthrough basic block)      testFailed = bb.nextBasicBlockInCodeOrder().makeJumpTarget();    }    // Translate condition operand respecting IA32 FCOMI    OPT_ConditionOperand c = IfCmp.getCond(s);    OPT_BranchOperand target = IfCmp.getTarget(s);    OPT_BranchProfileOperand branchProfile = IfCmp.getBranchProfile(s);    // FCOMI sets ZF, PF, and CF as follows:     // Compare Results      ZF     PF      CF    // left > right          0      0       0    // left < right          0      0       1    // left == right         1      0       0    // UNORDERED             1      1       1    // Propagate branch probabilities as follows: assume the    // probability of unordered (first condition) is zero, and    // propagate the original probability to the second condition.    switch(c.value) {      // Branches that WON'T be taken after unordered comparison      // (i.e. UNORDERED is a goto to testFailed)    case OPT_ConditionOperand.CMPL_EQUAL:      if (VM.VerifyAssertions) VM._assert(!c.branchIfUnordered());      // Check whether val1 and val2 operands are the same      if (!IfCmp.getVal1(s).similar(IfCmp.getVal2(s))) {        s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                               OPT_IA32ConditionOperand.PE(),  // PF == 1                                              testFailed,                                              new OPT_BranchProfileOperand(0f),                                              OPT_IA32ConditionOperand.EQ(),  // ZF == 1                                              target,                                              branchProfile));        s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      }      else {        // As val1 == val2 result of compare must be == or UNORDERED        s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                             OPT_IA32ConditionOperand.PO(),  // PF == 0                                             target,                                             branchProfile));        s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      }      break;    case OPT_ConditionOperand.CMPL_GREATER:      if (VM.VerifyAssertions) VM._assert(!c.branchIfUnordered());      s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                           OPT_IA32ConditionOperand.LGT(), // CF == 0 and ZF == 0                                           target,                                           branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      break;    case OPT_ConditionOperand.CMPG_LESS:      if (VM.VerifyAssertions) VM._assert(!c.branchIfUnordered());      s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                            OPT_IA32ConditionOperand.PE(),  // PF == 1                                            testFailed,                                            new OPT_BranchProfileOperand(0f),                                            OPT_IA32ConditionOperand.LLT(), // CF == 1                                            target,                                            branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      break;    case OPT_ConditionOperand.CMPL_GREATER_EQUAL:      if (VM.VerifyAssertions) VM._assert(!c.branchIfUnordered());      s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                           OPT_IA32ConditionOperand.LGE(), // CF == 0                                           target,                                           branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      break;    case OPT_ConditionOperand.CMPG_LESS_EQUAL:      s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                            OPT_IA32ConditionOperand.PE(),  // PF == 1                                            testFailed,                                            new OPT_BranchProfileOperand(0f),                                            OPT_IA32ConditionOperand.LGT(), // ZF == 0 and CF == 0                                            testFailed,                                            branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, target));      break;      // Branches that WILL be taken after unordered comparison      // (i.e. UNORDERED is a goto to target)    case OPT_ConditionOperand.CMPL_NOT_EQUAL:      if (VM.VerifyAssertions) VM._assert(c.branchIfUnordered());      // Check whether val1 and val2 operands are the same      if (!IfCmp.getVal1(s).similar(IfCmp.getVal2(s))) {        s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                              OPT_IA32ConditionOperand.PE(),  // PF == 1                                              target,                                              new OPT_BranchProfileOperand(0f),                                              OPT_IA32ConditionOperand.NE(),  // ZF == 0                                              target,                                              branchProfile));        s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      }      else {        // As val1 == val2 result of compare must be == or UNORDERED        s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                             OPT_IA32ConditionOperand.PE(),  // PF == 1                                             target,                                             branchProfile));        s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      }      break;    case OPT_ConditionOperand.CMPL_LESS:      if (VM.VerifyAssertions) VM._assert(c.branchIfUnordered());      s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                           OPT_IA32ConditionOperand.LLT(),   // CF == 1                                           target,                                           branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      break;    case OPT_ConditionOperand.CMPG_GREATER_EQUAL:      if (VM.VerifyAssertions) VM._assert(c.branchIfUnordered());      s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                            OPT_IA32ConditionOperand.PE(),  // PF == 1                                            target,                                            new OPT_BranchProfileOperand(0f),                                            OPT_IA32ConditionOperand.LLT(), // CF == 1                                            testFailed,                                            branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, target));      break;    case OPT_ConditionOperand.CMPG_GREATER:      if (VM.VerifyAssertions) VM._assert(c.branchIfUnordered());      s.insertBefore(MIR_CondBranch2.create(IA32_JCC2,                                            OPT_IA32ConditionOperand.PE(),  // PF == 1                                            target,                                            new OPT_BranchProfileOperand(0f),                                            OPT_IA32ConditionOperand.LGT(), // ZF == 0 and CF == 0                                            target,                                            branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP,testFailed));      break;    case OPT_ConditionOperand.CMPL_LESS_EQUAL:      if (VM.VerifyAssertions) VM._assert(c.branchIfUnordered());      s.insertBefore(MIR_CondBranch.create(IA32_JCC,                                           OPT_IA32ConditionOperand.LLE(), // CF == 1 or ZF == 1                                           target,                                           branchProfile));      s.insertBefore(MIR_Branch.create(IA32_JMP, testFailed));      break;    default:      OPT_OptimizingCompilerException.UNREACHABLE();    }    s.remove();    return nextInstr;  }