if (logwidth != 0) { if (offset instanceof OPT_IntConstantOperand) offset = IC(((OPT_IntConstantOperand)offset).value << logwidth); else offset = InsertBinary(s, ir, INT_SHL, VM_TypeReference.Int, offset, IC(logwidth)); }
if (index instanceof OPT_IntConstantOperand) { offset = AC(Address.fromIntZeroExtend(((OPT_IntConstantOperand)index).value << logwidth)); } else { if (logwidth != 0) { offset = InsertBinary(s, ir, INT_SHL, VM_TypeReference.Int, index, IC(logwidth)); offset = InsertUnary(s, ir, INT_2ADDRZerExt, VM_TypeReference.Offset, offset.copy()); } else { offset = InsertUnary(s, ir, INT_2ADDRZerExt, VM_TypeReference.Offset, index); } }
  public static void doArrayStore (OPT_Instruction s, OPT_IR ir,                             OPT_Operator op,                             int logwidth) {    if (LOWER_ARRAY_ACCESS) {      OPT_Operand value = AStore.getClearValue(s);      OPT_Operand array = AStore.getClearArray(s);      OPT_Operand offset = AStore.getClearIndex(s);      OPT_LocationOperand loc = AStore.getClearLocation(s);      if (logwidth != 0) {        if (offset instanceof OPT_IntConstantOperand) // constant propagation          offset = IC(((OPT_IntConstantOperand)offset).value << logwidth);         else           offset = InsertBinary(s, ir, INT_SHL, VM_TypeReference.Int, offset,                                 IC(logwidth));      }      Store.mutate(s, op, value, array, offset, loc, AStore.getClearGuard(s));    }  }