[LoopVec] Add a minor clarifying comment
authorPhilip Reames <listmail@philipreames.com>
Tue, 24 Nov 2020 18:44:55 +0000 (10:44 -0800)
committerPhilip Reames <listmail@philipreames.com>
Tue, 24 Nov 2020 18:45:06 +0000 (10:45 -0800)
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 3253678..af314ae 100644 (file)
@@ -5119,7 +5119,8 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
         addToWorklistIfAllowed(&I);
 
       // True if all users of Ptr are memory accesses that have Ptr as their
-      // pointer operand.
+      // pointer operand.  Since loops are assumed to be in LCSSA form, this
+      // disallows uses outside the loop as well.
       auto UsersAreMemAccesses =
           llvm::all_of(Ptr->users(), [&](User *U) -> bool {
             return getLoadStorePointerOperand(U) == Ptr;