diff --git a/src/hotspot/share/opto/parse1.cpp b/src/hotspot/share/opto/parse1.cpp index b93078defbf..4cf9695b631 100644 --- a/src/hotspot/share/opto/parse1.cpp +++ b/src/hotspot/share/opto/parse1.cpp @@ -1028,6 +1028,8 @@ void Parse::do_exits() { // transform each slice of the original memphi: mms.set_memory(_gvn.transform(mms.memory())); } + // Clean up input MergeMems created by transforming the slices + _gvn.transform(_exits.merged_memory()); if (tf()->range()->cnt() > TypeFunc::Parms) { const Type* ret_type = tf()->range()->field_at(TypeFunc::Parms);