[llvm] [NFC][LAA] Minor stylistic/comments improvements (PR #185510)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 10:15:19 PDT 2026


================
@@ -2760,15 +2769,20 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
     if (blockNeedsPredication(LD->getParent(), TheLoop, DT))
       Loc.AATags.TBAA = nullptr;
 
+    // Support "forked" pointers (i.e., a phi of multiple strided pointers) by
+    // treating them as if this instruction accesses all of those alternatives.
     visitPointers(const_cast<Value *>(Loc.Ptr), *TheLoop,
                   [&Accesses, AccessTy, Loc, IsReadOnlyPtr](Value *Ptr) {
                     MemoryLocation NewLoc = Loc.getWithNewPtr(Ptr);
                     Accesses.addLoad(NewLoc, AccessTy, IsReadOnlyPtr);
                   });
   }
 
-  // If we write (or read-write) to a single destination and there are no
-  // other reads in this loop then is it safe to vectorize.
+  // If we write (or read-write) to a single destination and there are no other
+  // reads in this loop then is it safe to vectorize. The safety here is
+  // guaranteed by the fact that the vectorizez version of the store would
----------------
eas wrote:

Whoops, fixed, thanks!

https://github.com/llvm/llvm-project/pull/185510


More information about the llvm-commits mailing list