[llvm] [SLPVectorizer] minor tweaks around lambdas for compatibilty with older compilers (PR #122348)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 13:09:28 PST 2025


================
@@ -6923,8 +6923,8 @@ void BoUpSLP::tryToVectorizeGatheredLoads(
                              Loads.size());
     Align Alignment = computeCommonAlignment<LoadInst>(Values);
     auto *Ty = getWidenedType(Loads.front()->getType(), Loads.size());
-    return TTI->isLegalMaskedGather(Ty, Alignment) &&
-           !TTI->forceScalarizeMaskedGather(Ty, Alignment);
+    return this->TTI->isLegalMaskedGather(Ty, Alignment) &&
----------------
alexey-bataev wrote:

I suggest something like this instead:
```
auto IsMaskedGatherSupported = [&, TTI=TTI](ArrayRef<LoadInst *> Loads) {
```

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


More information about the llvm-commits mailing list