8221592: C2 compilation failed with assert(!q->is_MergeMem())
Summary: Transform the original MergeMem after transforming the slices to get rid of MergeMem inputs.
Reviewed-by: kvn, neliasso
--- a/src/hotspot/share/opto/parse1.cpp Sat Apr 27 18:21:57 2019 +0800
+++ b/src/hotspot/share/opto/parse1.cpp Mon Apr 29 09:04:25 2019 +0200
@@ -1028,6 +1028,8 @@
// 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);