[llvm] [ValueTracking] Conservative NoSync check prevents vectorization (PR #199002)
Kshitij Paranjape via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 03:31:43 PDT 2026
================
@@ -708,18 +708,23 @@ bool llvm::willNotFreeBetween(const Instruction *Assume,
for (const auto &[Idx, I] : enumerate(Range)) {
if (Idx > MaxInstrsToCheckForFree)
return false;
- if (const auto *CB = dyn_cast<CallBase>(&I))
- if (!CB->hasFnAttr(Attribute::NoFree))
+ if (I.isVolatile())
----------------
kshitijvp wrote:
If that is dropped the test @volatileNotVectorizingTest that I have added is getting vectorized too.
https://github.com/llvm/llvm-project/pull/199002
More information about the llvm-commits
mailing list