if (IfCmp.getVal1(cb).isRegister()) { OPT_Register r = IfCmp.getVal1(cb).asRegister().register; if (r.isFloatingPoint() || r.isLong()) return false; } else if (IfCmp.getVal2(cb).isRegister()) { OPT_Register r = IfCmp.getVal2(cb).asRegister().register; if (r.isFloatingPoint() || r.isLong()) return false; }
if ((IfCmp.getVal1(cb).isRegister() &&  IfCmp.getVal1(cb).asRegister().register.isLong()) || (IfCmp.getVal2(cb).isRegister() &&  IfCmp.getVal2(cb).asRegister().register.isLong())) { return false; }
  private boolean generateCondMove(OPT_IR ir, OPT_BasicBlock bb,                                    OPT_Instruction cb) {    if (!VM.BuildForIA32) return false;    if (!IfCmp.conforms(cb)) return false;    // see if bb is the root of an if-then-else.    OPT_Diamond diamond = OPT_Diamond.buildDiamond(bb);    if (diamond == null) return false;    OPT_BasicBlock taken = diamond.getTaken();    OPT_BasicBlock notTaken= diamond.getNotTaken();    // do not perform the transformation if either branch of the diamond    // has a taboo instruction (eg., a PEI, store or divide).    if (taken != null && hasCMTaboo(taken)) return false;    if (notTaken != null && hasCMTaboo(notTaken)) return false;    // if we must generate FCMOV, make sure the condition code is OK    if (hasFloatingPointDef(taken) || hasFloatingPointDef(notTaken)) {      if (!fpConditionOK(IfCmp.getCond(cb))) return false;    }    // For now, do not generate CMOVs if the condition depends on    // floating-point compares, with troublesome NaN semantics    if (IfCmp.getVal1(cb).isRegister()) {      OPT_Register r = IfCmp.getVal1(cb).asRegister().register;      if (r.isFloatingPoint() || r.isLong()) return false;    } else if (IfCmp.getVal2(cb).isRegister()) {       OPT_Register r = IfCmp.getVal2(cb).asRegister().register;      if (r.isFloatingPoint() || r.isLong()) return false;    }    // Don't generate CMOVs for branches that can be folded.    if (IfCmp.getVal1(cb).isConstant() && IfCmp.getVal2(cb).isConstant()) {      return false;    }        // For now, do not generate CMOVs for longs.    if (hasLongDef(taken) || hasLongDef(notTaken)) {      return false;    }        // count the number of expression evaluations in each side of the    // diamond    int takenCost = 0;    int notTakenCost = 0;    if (taken != null) takenCost = evaluateCost(taken);    if (notTaken != null) notTakenCost = evaluateCost(notTaken);        // evaluate whether it's profitable.    int shortestCost = Math.min(takenCost,notTakenCost);    int xformCost = 2 * (takenCost + notTakenCost);    int k = ir.options.COND_MOVE_CUTOFF;    if (xformCost - shortestCost > k) return false;    // Perform the transformation!    doCondMove(ir, diamond, cb);    return true;  }