Skip to content

Commit 8d0d2e9

Browse files
committed
More comment improvement
1 parent 20bf7ad commit 8d0d2e9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -680,16 +680,17 @@ std::vector<Chain> Vectorizer::splitChainByContiguity(Chain &C) {
680680
: TTI.isLegalMaskedStore(OptimisticVectorType, OptimisticAlign, AS,
681681
TTI::MaskKind::ConstantMask);
682682

683-
unsigned ASPtrBits = DL.getIndexSizeInBits(AS);
684-
685-
// Compute the alignment of the leader of the chain (which every stored offset
686-
// is based on) using the current first element of the chain. This is
687-
// conservative, we may be able to derive better alignment by iterating over
688-
// the chain and finding the leader.
683+
// Derive the alignment of the leader of the chain (which every
684+
// OffsetFromLeader is based on) using the current first element of the chain.
685+
// We could derive a better alignment by iterating over the entire chain but
686+
// this should be sufficient. We use this value to derive the alignment of any
687+
// extra elements we create while gap filling.
689688
Align LeaderOfChainAlign =
690689
commonAlignment(getLoadStoreAlignment(C[0].Inst),
691690
C[0].OffsetFromLeader.abs().getLimitedValue());
692691

692+
unsigned ASPtrBits = DL.getIndexSizeInBits(AS);
693+
693694
std::vector<Chain> Ret;
694695
Ret.push_back({C.front()});
695696

0 commit comments

Comments
 (0)