--- a/src/hotspot/share/opto/matcher.cpp Wed Aug 29 11:25:51 2018 +0100
+++ b/src/hotspot/share/opto/matcher.cpp Wed Aug 22 10:29:17 2018 +0200
@@ -1002,6 +1002,9 @@
m = n->is_SafePoint() ? match_sfpt(n->as_SafePoint()):match_tree(n);
if (C->failing()) return NULL;
if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
+ if (n->is_MemBar()) {
+ m->as_MachMemBar()->set_adr_type(n->adr_type());
+ }
} else { // Nothing the matcher cares about
if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections?
// Convert to machine-dependent projection