[llvm] [SLP]Initial support for (masked)loads + compress and (masked)interleaved (PR #132099)
Alexander Kornienko via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 04:10:08 PDT 2025
alexfh wrote:
FWIW, it looks like rewriting this as a loop would make the code slightly simpler:
```
@@ -20797,10 +20797,10 @@
CandidateVFs.push_back(Limit);
if (VF > MaxTotalNum || VF >= StoresLimit)
break;
- for_each(RangeSizes, [&](std::pair<unsigned, unsigned> &P) {
+ for(auto& P : RangeSizes) {
if (P.first != 0)
P.first = std::max(P.second, P.first);
- });
+ }
// Last attempt to vectorize max number of elements, if all previous
// attempts were unsuccessful because of the cost issues.
CandidateVFs.push_back(VF);
```
And it also makes the crash disappear, though it may be due to the issue being fragile.
https://github.com/llvm/llvm-project/pull/132099
More information about the llvm-commits
mailing list