Remove redundant memory barriers.