[llvm] 0754686 - [LoopVec] Add a minor clarifying comment
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 10:45:15 PST 2020
Author: Philip Reames
Date: 2020-11-24T10:45:06-08:00
New Revision: 075468621c0f4569f4c91d4f3097b3a60812cfcc
URL: https://github.com/llvm/llvm-project/commit/075468621c0f4569f4c91d4f3097b3a60812cfcc
DIFF: https://github.com/llvm/llvm-project/commit/075468621c0f4569f4c91d4f3097b3a60812cfcc.diff
LOG: [LoopVec] Add a minor clarifying comment
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 3253678e6532..af314ae4b27b 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -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;
More information about the llvm-commits
mailing list