8257632: C2: Late inlining attempt on a call with a dead memory crashes
Reviewed-by: neliasso, kvn, thartmann
This commit is contained in:
parent
6845fee905
commit
417e7e6317
@ -363,6 +363,12 @@ void LateInlineCallGenerator::do_late_inline() {
|
||||
assert(Compile::current()->inlining_incrementally(), "shouldn't happen during parsing");
|
||||
return;
|
||||
}
|
||||
if (call->in(TypeFunc::Memory)->is_MergeMem()) {
|
||||
MergeMemNode* merge_mem = call->in(TypeFunc::Memory)->as_MergeMem();
|
||||
if (merge_mem->base_memory() == merge_mem->empty_memory()) {
|
||||
return; // dead path
|
||||
}
|
||||
}
|
||||
|
||||
// check for unreachable loop
|
||||
CallProjections callprojs;
|
||||
|
@ -1460,6 +1460,7 @@ void GraphKit::replace_in_map(Node* old, Node* neww) {
|
||||
Node* GraphKit::memory(uint alias_idx) {
|
||||
MergeMemNode* mem = merged_memory();
|
||||
Node* p = mem->memory_at(alias_idx);
|
||||
assert(p != mem->empty_memory(), "empty");
|
||||
_gvn.set_type(p, Type::MEMORY); // must be mapped
|
||||
return p;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user