[llvm] [VPlan] Eta-reduce fn in pullOutPermutations (NFC) (PR #212439)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 02:19:31 PDT 2026


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/212439

fun x => f x can be eta-reduced to just f.

>From 395baa84a1baf4f0dc826c5627bdc627a6781b96 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <artagnon at tenstorrent.com>
Date: Tue, 28 Jul 2026 10:16:49 +0100
Subject: [PATCH] [VPlan] Eta-reduce fn in pullOutPermutations (NFC)

fun x => f x can be eta-reduced to just f.
---
 llvm/lib/Transforms/Vectorize/VPlanUtils.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
index b740cdc1b5650..e8023468e98ef 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
@@ -1131,8 +1131,7 @@ void vputils::detail::pullOutPermutationsImpl(
         continue;
 
       // At least one of the ops must be a permutation.
-      if (none_of(Def->operands(),
-                  [&MatchPerm](VPValue *Op) { return MatchPerm(Op); }))
+      if (none_of(Def->operands(), MatchPerm))
         continue;
 
       // All operands must be a single-use permutation or a live in (splat).



More information about the llvm-commits mailing list