[PATCH] D42257: AMDGPU/MemoryModel: Fix monotonic atomic loads
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 21:10:57 PST 2018
t-tye accepted this revision.
t-tye added a comment.
LGTM other than @arsenm suggestion which may apply to some other places too. AtomicOrdering.h does not seem to other useful queries such as isAcquire/isRelease that could be used.
================
Comment at: lib/Target/AMDGPU/SIMemoryLegalizer.cpp:401-403
+ if (MOI.getOrdering() == AtomicOrdering::Monotonic ||
+ MOI.getOrdering() == AtomicOrdering::Acquire ||
MOI.getOrdering() == AtomicOrdering::SequentiallyConsistent)
----------------
arsenm wrote:
> Can this be expressed in terms of one of the isStrongerThan* helpers?
Could probably be:
```
if (isStrongerThanMonotonic(MOI.getOrdering())) {
```
A load cannot be a release or acq_rel so returning true for those will not happen.
https://reviews.llvm.org/D42257
More information about the llvm-commits
mailing list