[llvm] [LV] Factor costInterleaveGatherScatter (NFC) (PR #215857)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 03:46:36 PDT 2026


================
@@ -2369,6 +2433,13 @@ bool LoopVectorizationCostModel::isLegalMaskedLoadOrStore(
                                          getLoadStoreAddressSpace(I));
 }
 
+bool LoopVectorizationCostModel::isLegalGatherOrScatter(Instruction *I,
+                                                        ElementCount VF) const {
+  assert((isa<LoadInst, StoreInst>(I)));
+  return Config.isLegalGatherOrScatter(isa<LoadInst>(I), getLoadStoreType(I),
+                                       getLoadStoreAlignment(I), VF);
+}
+
----------------
artagnon wrote:

Sure, see https://github.com/llvm/llvm-project/pull/221698.

https://github.com/llvm/llvm-project/pull/215857


More information about the llvm-commits mailing list