[llvm] [VPlan] Encode single-scalar-ness of VPInstruction in a field (NFC). (PR #227761)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 09:54:39 PDT 2026


eas wrote:

> > Are you thinking about something like
> > [...]
> 
> Yeah, something like that -- I thought that's what we'd do with the example you showed. Don't we currently create different VPlans for different VFs, cost them against each other, and pick the best VPlan? I think the VPlans contain more significant differences than just having a different multiple of VF encoded in each VPValue, so I'm not sure exactly how `[unit, VF, VF *2]` would be viable?

That's not **that** VF. The `[unit, VF, VF*2]` is for a given `VPlan for VFs ...` where we need different recipes inside that **single** VPlan to operate on different VFs (again, someone has needed that but I can't remember what PR that was).

Imagine final lowering of the interleave group:

```llvm
%group_load = load i32 [VF*4] ptr %p
%val0 = shufflevector/deinterleave-intrinsic i32 [VF] %group_load
```

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


More information about the llvm-commits mailing list