================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits