Slightly simplify Matcher::ReduceInst() by replacing the following lines [1]:
if (leaf->is_LoadStore()) {
mach->set_barrier_data(leaf->as_LoadStore()->barrier_data());
} else if (leaf->is_Mem()) {
mach->set_barrier_data(leaf->as_Mem()->barrier_data());
}
with a call to MemNode::barrier_data(), added recently byJDK-8322692.
[1] https://github.com/openjdk/jdk/blob/3f1d9c441ea98910d9483e133bccfac784db393d/src/hotspot/share/opto/matcher.cpp#L1892-L1897
if (leaf->is_LoadStore()) {
mach->set_barrier_data(leaf->as_LoadStore()->barrier_data());
} else if (leaf->is_Mem()) {
mach->set_barrier_data(leaf->as_Mem()->barrier_data());
}
with a call to MemNode::barrier_data(), added recently by
[1] https://github.com/openjdk/jdk/blob/3f1d9c441ea98910d9483e133bccfac784db393d/src/hotspot/share/opto/matcher.cpp#L1892-L1897