(type2.isWordType() && op2.asIntConstant().value == 0) ||
(type2.isWordType() && op2.asAddressConstant().value.isZero()) ||
  public static OPT_Operand meet(OPT_Operand op1,                                  OPT_Operand op2,                                  OPT_Register reg) {    // Step 1: Handler pointer equality and bottom    if (op1 == op2) {      if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {        if (op1 == null) {          VM.sysWrite("Both operands are bottom\n");        } else {          VM.sysWrite("Operands are identical\n");        }      }      return op1;    }    if (op1 == null) {      if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {        VM.sysWrite("Op1 was already bottom\n");      }      return op1;    }    if (op2 == null) {      if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {        VM.sysWrite("Op2 is bottom (but op1 was not)\n");      }      return op2;    }    // Now handle the nontrivial cases...    // Step 2: op1 is <null> (the null constant)    if (op1 instanceof OPT_NullConstantOperand) {      if (op2 instanceof OPT_NullConstantOperand) {        if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {          VM.sysWrite("Both operands are <null>\n");        }        return op1;      } else {        VM_TypeReference type2 = op2.getType();        if (type2.isReferenceType()) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("op1 is <null>, but op2 is other ref type\n");          }          return new OPT_RegisterOperand(reg, type2);        } else {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("op1 is <null>, but op2 is not a ref type\n");          }          return null; // bottom        }      }    }    // Step 3: op1 is some other constant    if (op1.isConstant()) {      if (op1.similar(op2)) {        if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {          VM.sysWrite("op1 and op2 are similar constants\n");        }        return op1;      } else {        VM_TypeReference superType =           OPT_ClassLoaderProxy.findCommonSuperclass(op1.getType(),                                                     op2.getType());        if (superType == null) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("op1 and op2 have incompatible types\n");          }          return null; // bottom        } else {          return new OPT_RegisterOperand(reg, superType);        }      }    }    // Step 4: op1 is a register operand    // This case is complicated by the need to ensure that     // the various Flag bits are considered as well....    if (op1.isRegister()) {      OPT_RegisterOperand rop1 = op1.asRegister();      VM_TypeReference type1 = rop1.type;      if (op2.isRegister()) {        OPT_RegisterOperand rop2 = op2.asRegister();        VM_TypeReference type2 = rop2.type;        if (type1 == type2) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Identically typed register operands, checking flags...");          }          if (rop1.hasLessConservativeFlags(rop2)) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("mismatch\n");            }            OPT_RegisterOperand res =               new OPT_RegisterOperand(reg, type1, rop1.getFlags());            if (rop1.scratchObject instanceof OPT_Operand &&                rop2.scratchObject instanceof OPT_Operand &&                (((OPT_Operand)rop1.scratchObject).similar(((OPT_Operand)rop2.scratchObject)))) {              res.scratchObject = rop1.scratchObject; // compatible, so preserve onto res            }            res.meetInheritableFlags(rop2);            return res;          } else if (OPT_BC2IR.hasLessConservativeGuard(rop1, rop2)) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("Operands are registers of identical type with compatible flags but with incompatible non-null guards\n");            }            // by not setting scratchObject we mark as possible null            return new OPT_RegisterOperand(reg, type1, rop1.getFlags());          } else {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("match\n");            }            return op1;          }        } else if (compatiblePrimitives(type1, type2) ||                   OPT_ClassLoaderProxy.includesType(type1, type2) == OPT_Constants.YES) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Compatabily typed register operands, checking flags...");          }          if (rop1.isPreciseType() ||               rop1.hasLessConservativeFlags(rop2)) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("mismatch\n");            }            OPT_RegisterOperand res =               new OPT_RegisterOperand(reg, type1, rop1.getFlags());            res.meetInheritableFlags(rop2);            // even if both op1 & op2 are precise,             // op1.type != op2.type, so clear it on res            res.clearPreciseType();            if (rop1.scratchObject instanceof OPT_Operand &&                rop2.scratchObject instanceof OPT_Operand &&                (((OPT_Operand)rop1.scratchObject).similar(((OPT_Operand)rop2.scratchObject)))) {              // it matched, so preserve onto res.              res.scratchObject = rop1.scratchObject;             }            return res;          } else if (OPT_BC2IR.hasLessConservativeGuard(rop1, rop2)) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("Operands are registers of compatible type and flags but with incompatible non-null guards\n");            }            return new OPT_RegisterOperand(reg, type1, rop1.getFlags());          } else {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("match\n");            }            return op1;          }        } else {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Incompatibly typed register operands...("+type1+", "+type2+")...");          }          VM_TypeReference resType = OPT_ClassLoaderProxy.findCommonSuperclass(type1, type2);          if (resType == null) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("no common supertype, returning bottom\n");            }            return null; // bottom          } else {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("found common supertype\n");            }            OPT_RegisterOperand res =               new OPT_RegisterOperand(reg, resType, rop1.getFlags());            res.meetInheritableFlags(rop2);            res.clearPreciseType();     // invalid on res            res.clearDeclaredType();    // invalid on res            if (rop1.scratchObject instanceof OPT_Operand &&                rop2.scratchObject instanceof OPT_Operand &&                (((OPT_Operand)rop1.scratchObject).similar(((OPT_Operand)rop2.scratchObject)))) {              // it matched, so preserve onto res.              res.scratchObject = rop1.scratchObject;            }            return res;          }        }      } else {        if (op2 instanceof OPT_BC2IR.ReturnAddressOperand ||             op2 == OPT_BC2IR.DUMMY) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Incompatabily typed operands");          }          return null; // bottom        }        VM_TypeReference type2 = op2.getType();        if (type1 == type2 ||             compatiblePrimitives(type1, type2) ||            (OPT_ClassLoaderProxy.includesType(type1, type2) == OPT_Constants.YES)) {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Compatabily typed register & other operand, checking flags...");          }          OPT_RegisterOperand res = rop1;          if (res.isPreciseType() && type1 != type2) {            res = res.copyU2U();            res.clearPreciseType();          }          if ((rop1.scratchObject instanceof OPT_Operand) &&               ((type2 == VM_TypeReference.NULL_TYPE) ||               (type2.isIntLikeType() && op2.asIntConstant().value == 0) ||               (type2.isWordType() && op2.asIntConstant().value == 0) ||               (type2.isLongType() && op2.asLongConstant().value == 0L))) {            res = res.copyU2U();            res.scratchObject = null;          }          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            if (res == rop1) {              VM.sysWrite("match\n");            } else {              VM.sysWrite("mismatch\n");            }          }          return res;        } else {          if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {            VM.sysWrite("Incompatabily typed register & other operand...("+type1+", "+type2+")...");          }          VM_TypeReference resType = OPT_ClassLoaderProxy.findCommonSuperclass(type1, type2);          if (resType == null) {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("no common supertype, returning bottom\n");            }            return null; // bottom          } else {            if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {              VM.sysWrite("found common supertype\n");            }            return new OPT_RegisterOperand(reg, resType);          }        }      }    }    // Step 5: op1 is some OPT_IRGEN operand    if (op1.similar(op2)) {      if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {        VM.sysWrite("Compatible OPT_BC2IR.* operands\n");      }      return op1;    } else {      if (OPT_IRGenOptions.DBG_OPERAND_LATTICE) {        VM.sysWrite("Incompatible OPT_BC2IR.* operands, returning bottom\n");      }      return null; // bottom    }  }