if (VM.VerifyAssertions) VM.assert (LocationCarrier.conforms (y));
if (VM.VerifyAssertions) VM._assert (LocationCarrier.conforms (y));
  private boolean simplify (OPT_Instruction inst)  {    if (!Phi.conforms (inst)) return false;  // no phi    if (Phi.getNumberOfValues (inst) != 2) return false; // want exactly 2 inputs        //VM.sysWrite ("Simplify "+inst+"\n");        OPT_Operand resOp = Phi.getResult (inst);        if (! (resOp instanceof OPT_HeapOperand)) {      //VM.sysWrite (" no heap op result\n");            return false; // scalar phi    }    OPT_Instruction x = definingInstruction (Phi.getValue (inst, 0));    OPT_Instruction y = definingInstruction (Phi.getValue (inst, 1));    int xidx = 0;    if (dominator.dominates (getOrigBlock (inst), getOrigBlock (x))) {      OPT_Instruction h = x; x = y; y = h; xidx = 1;    }    if (!dominator.dominates (getOrigBlock (inst), getOrigBlock (y))) {      //VM.sysWrite (" not dominated by inst\n");            return false;    }    if (!dominator.dominates (getOrigBlock (x), getOrigBlock (inst))) {      //VM.sysWrite (" does not dominate inst\n");            return false;    }    replaceUses (inst, (OPT_HeapOperand) Phi.getValue (inst, xidx),		                         Phi.getPred  (inst, xidx), true);        if (y.isPEI()) {//        while (y.isPEI() && !y.isImplicitStore()) {//  	OPT_HeapOperand[] ops = null;//  	//VM.sysWrite (" y: "+y+"\n");//  	ops = ssad.getHeapUses (y);//  	int idx = -1;//  	for (int i = ops.length - 1;  i >= 0;  --i) {//  	  if (ops[i].value.type == ssad.exceptionState) {//  	    if (idx == -1)//  	      idx = i;//  	    else//  	      return false;//  	  }//  	}//  	if (VM.VerifyAssertions) VM.assert (idx >= 0);	//  	y = definingInstruction (ops[idx]);//        }    } else {      while (y.isImplicitLoad() && !y.isImplicitStore() && !y.isPEI()) {	OPT_HeapOperand[] ops = null;	//VM.sysWrite (" y: "+y+"\n");	// check for access to volatile field	if (VM.VerifyAssertions) VM.assert (LocationCarrier.conforms (y));	OPT_LocationOperand loc = LocationCarrier.getLocation (y);	if (loc == null || loc.isFieldAccess() && loc.getField().isVolatile()){	  //VM.sysWrite (" no loc or volatile field\n");	  	  return false;	}	ops = ssad.getHeapUses (y);	if (ops.length != 1){	  //VM.sysWrite (" y uses "+ops.length+" ops\n");	  return false;	}	y = definingInstruction (ops[0]);      }    }    if (y == inst)      replaceUses (inst, (OPT_HeapOperand) Phi.getValue (inst, xidx),		                           Phi.getPred  (inst, xidx), false);       //VM.sysWrite (" didn't make it\n");    return false;  }