< prev index next >

src/hotspot/share/c1/c1_ValueMap.cpp

Print this page
*** 612,10 ***
--- 612,12 ---
  
  void GlobalValueNumbering::substitute(Instruction* instr) {
    assert(!instr->has_subst(), "substitution already set");
    Value subst = current_map()->find_insert(instr);
    if (subst != instr) {
+     assert(instr->as_LoadIndexed() == nullptr || !instr->as_LoadIndexed()->should_profile(), "should not be optimized out");
+     assert(instr->as_StoreIndexed() == nullptr, "should not be optimized out");
      assert(!subst->has_subst(), "can't have a substitution");
  
      TRACE_VALUE_NUMBERING(tty->print_cr("substitution for %c%d set to %c%d", instr->type()->tchar(), instr->id(), subst->type()->tchar(), subst->id()));
      instr->set_subst(subst);
      _has_substitutions = true;
< prev index next >