--- old/src/share/vm/opto/compile.cpp 2021-01-25 19:30:43.018911880 +0000 +++ new/src/share/vm/opto/compile.cpp 2021-01-25 19:30:42.885910482 +0000 @@ -73,6 +73,8 @@ # include "adfiles/ad_x86_32.hpp" #elif defined TARGET_ARCH_MODEL_x86_64 # include "adfiles/ad_x86_64.hpp" +#elif defined TARGET_ARCH_MODEL_aarch64 +# include "adfiles/ad_aarch64.hpp" #elif defined TARGET_ARCH_MODEL_sparc # include "adfiles/ad_sparc.hpp" #elif defined TARGET_ARCH_MODEL_zero @@ -2673,6 +2675,17 @@ LoadNode::is_immutable_value(n->in(MemNode::Address))), "raw memory operations should have control edge"); } + if (n->is_MemBar()) { + MemBarNode* mb = n->as_MemBar(); + if (mb->trailing_store() || mb->trailing_load_store()) { + assert(mb->leading_membar()->trailing_membar() == mb, "bad membar pair"); + Node* mem = mb->in(MemBarNode::Precedent); + assert((mb->trailing_store() && mem->is_Store() && mem->as_Store()->is_release()) || + (mb->trailing_load_store() && mem->is_LoadStore()), "missing mem op"); + } else if (mb->leading()) { + assert(mb->trailing_membar()->leading_membar() == mb, "bad membar pair"); + } + } #endif // Count FPU ops and common calls, implements item (3) switch( nop ) {