Relax the constraint more in MemoryDependencyAnalysis.cpp
authorRobin Morisset <morisset@google.com>
Fri, 29 Aug 2014 20:32:58 +0000 (20:32 +0000)
committerRobin Morisset <morisset@google.com>
Fri, 29 Aug 2014 20:32:58 +0000 (20:32 +0000)
commit66b380b6b60f96816346fa50f049b5463512387f
treed47467682d77fb2c86323eb01bc8bc4465b32944
parent22f3cb0dc4308d6742b5545df4ddf0fd0a97f657
Relax the constraint more in MemoryDependencyAnalysis.cpp

Even loads/stores that have a stronger ordering than monotonic can be safe.
The rule is no release-acquire pair on the path from the QueryInst, assuming that
the QueryInst is not atomic itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemoryDependenceAnalysis.cpp
test/Transforms/DeadStoreElimination/atomic.ll
test/Transforms/GVN/atomic.ll