[llvm] [ValueTracking] Conservative nosync check prevents vectorization (PR #181345)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 03:51:14 PDT 2026
================
@@ -821,6 +821,13 @@ inline bool isGuaranteedNotToBePoison(const Value *V, AssumptionCache *AC,
return isGuaranteedNotToBePoison(V, AC, &*CtxI, DT, Depth);
}
+// Return true if this is an atomic which has an ordering stronger than
+// unordered. Note that this is different than the predicate we use in
+// Attributor. Here we chose to be conservative and consider monotonic
+// operations potentially synchronizing. We generally don't do much with
+// monotonic operations, so this is simply risk reduction.
----------------
fhahn wrote:
```suggestion
/// Returns true if this is an atomic which has an ordering stronger than
/// unordered.
```
Not sure if we need to reference attributor here?
https://github.com/llvm/llvm-project/pull/181345
More information about the llvm-commits
mailing list