[PATCH] D119844: [MemoryDependency] Relax the re-ordering of atomic store and unordered load/store

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 09:26:23 PST 2022


reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Analysis/MemoryDependenceAnalysis.cpp:565
           return MemDepResult::getClobber(SI);
-        if (SI->getOrdering() != AtomicOrdering::Monotonic)
-          return MemDepResult::getClobber(SI);
+        // Ok, if we are here the guard above guarantee us that
+        // SI is atomic with monotonic ot release semantic and
----------------
I don't this comment holds.  We can get here with SI being e.g. a ceq_cst store.  Reordering that with just about anything is illegal.

The prior change to check is non-unordered instead of non-simple looks reasonable, but the change below doesn't seem to follow.  


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119844/new/

https://reviews.llvm.org/D119844



More information about the llvm-commits mailing list