[llvm] [SLPVectorizer] Move size checks (NFC) (PR #159361)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 13:50:00 PDT 2025
================
@@ -6822,10 +6821,20 @@ 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();
+ if (Diff % (Sz - 1) != 0)
+ return false;
+
+ // Try to generate strided load node.
+ auto IsAnyPointerUsedOutGraph =
+ Iany_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