[llvm] [AA] Improve precision for monotonic atomic load/store operations (PR #158169)
Jin Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 00:27:57 PDT 2025
================
@@ -431,6 +431,14 @@ ModRefInfo AAResults::getModRefInfo(const LoadInst *L,
if (AR == AliasResult::NoAlias)
return ModRefInfo::NoModRef;
}
+
+ // At this point, the load's ordering is at most `Monotonic` (i.e., Monotonic,
+ // Unordered, or non-atomic), and it aliases with `Loc`. The condition
----------------
jinhuang1102 wrote:
Replace the comments by
```c++
assert(!isStrongerThanMonotonic(L->getOrdering()) &&
"Stronger atomic orderings should have been handled above!" );
```
https://github.com/llvm/llvm-project/pull/158169
More information about the llvm-commits
mailing list