Skip to content

Commit cae6020

Browse files
committed
Add comment to clarify API usage
1 parent 8d0d2e9 commit cae6020

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ std::vector<Chain> Vectorizer::splitChainByContiguity(Chain &C) {
671671
Align OptimisticAlign = Align(MaxVecRegBits / 8);
672672
unsigned int MaxVectorNumElems =
673673
MaxVecRegBits / DL.getTypeSizeInBits(ElementType);
674+
// Note: This check decides whether to try to fill gaps based on the masked
675+
// legality of the target's maximum vector size (getLoadStoreVecRegBitWidth).
676+
// If a target *does not* support a masked load/store with this max vector
677+
// size, but *does* support a masked load/store with a *smaller* vector size,
678+
// that optimization will be missed. This does not occur in any of the targets
679+
// that currently support this API.
674680
FixedVectorType *OptimisticVectorType =
675681
FixedVectorType::get(ElementType, MaxVectorNumElems);
676682
bool TryFillGaps =

0 commit comments

Comments
 (0)