[llvm-branch-commits] [llvm] [SandboxVec][LoadStoreVec] Move contiguity check into canVectorize() (NFC) (PR #236636)
Vasileios Porpodas via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 29 12:01:57 PDT 2026
================
@@ -30,6 +30,14 @@ namespace sandboxir {
std::optional<Type *> LoadStoreVec::canVectorize(BndlRef<Instruction *> Bndl) {
LLVM_DEBUG(dbgs() << DEBUG_PREFIX << "canVectorize() Bundle:\n";
VecUtils::dump(Bndl));
+ if (isa<StoreInst>(Bndl[0])) {
----------------
vporpo wrote:
Shouldn't this be part of `LegalityAnalysis::canVectorizeLSV()` ? The corresponding legality check for the bundlevec `LegalityAnalysis::canVectorize()` already checks for consecutive loads/stores (in `notVectorizableBasedOnOpcodesAndTypes()`) and we already have a `ResultReason::NotConsecutive` that we could reuse.
https://github.com/llvm/llvm-project/pull/236636
More information about the llvm-branch-commits
mailing list