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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 05:40:58 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]);
----------------
david-arm wrote:

Looks like this doesn't quite match the old code in `narrowInterleaveGroups`, i.e. 

```
  ... = dyn_cast_or_null<VPWidenRecipe>(
        InterleaveR->getStoredValues()[0]->getDefiningRecipe());
```

Does it matter? Just a bit worried it's not actually NFC and changing behaviour in a subtle way.

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


More information about the llvm-commits mailing list