[llvm] [VPlan] Add doesGenerateSingleScalar and use where applicable. (NFCI) (PR #222447)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 04:06:35 PDT 2026


================
@@ -70,6 +70,10 @@ bool isElementwise(const VPValue *V);
 /// Returns true if \p R produces scalar values for all VF lanes.
 bool doesGeneratePerAllLanes(const VPRecipeBase *R);
 
+/// Returns true if \p VPV is defined by a recipe producing a single-scalar
+/// value or a live-in/symbolic value/single-scalar region value.
----------------
lukel97 wrote:

Nit it would be good to specify that this specifically doesn't check the operands, maybe something like

```suggestion
/// Returns true if \p VPV is produces a single-scalar value regardless of its operands.
```

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


More information about the llvm-commits mailing list