[llvm] [SLPVectorizer] Move size checks (NFC) (PR #159361)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 20 08:55:20 PDT 2025
================
@@ -6822,10 +6821,22 @@ bool BoUpSLP::isStridedLoad(ArrayRef<Value *> VL, ArrayRef<Value *> PointerOps,
ArrayRef<unsigned> Order,
const TargetTransformInfo &TTI,
const DataLayout &DL, ScalarEvolution &SE,
- const bool IsAnyPointerUsedOutGraph,
const int64_t Diff,
StridedPtrInfo &SPtrInfo) const {
const size_t Sz = VL.size();
+ // Simple check if not a strided access - clear order.
+ bool IsPossibleStrided = Diff % (Sz - 1) == 0;
+ if (!IsPossibleStrided)
+ return false;
+
+ // Try to generate strided load node.
+ auto IsAnyPointerUsedOutGraph =
+ IsPossibleStrided && any_of(PointerOps, [&](Value *V) {
----------------
alexey-bataev wrote:
```suggestion
any_of(PointerOps, [&](Value *V) {
```
https://github.com/llvm/llvm-project/pull/159361
More information about the llvm-commits
mailing list