[llvm] [VPlan] Move out canNarrowOps (NFC). (PR #167309)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 07:54:39 PST 2025


================
@@ -4142,6 +4142,32 @@ static bool canNarrowLoad(VPWidenRecipe *WideMember0, unsigned OpIdx,
   return false;
 }
 
+static bool canNarrowOps(ArrayRef<VPValue *> Ops) {
+  SmallVector<VPValue *> Ops0;
+  auto *WideMember0 = dyn_cast<VPWidenRecipe>(Ops[0]);
+  if (!WideMember0)
+    return false;
+
+  for (unsigned Idx = 0; Idx != WideMember0->getNumOperands(); ++Idx) {
----------------
david-arm wrote:

OK thanks for explaining. It does seem a bit clearer now.

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


More information about the llvm-commits mailing list