[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 08:49:28 PDT 2026
eas wrote:
> Hm, so the idea would be to narrow recipes to single-scalars by simply narrowing its operands, and query the single-scalar-ness of recipes by checking if any of the operands are single-scalar?
I think the process/optimization and representation (`getSymbolicTypes` + VPlan printing) are orthogonal. Are you thinking about something like
```llvm
Live-ins:
%bcast-ptr = ptr [unit, VF]
...
%val = load i32 [unit, VF] %bcast-ptr
store [VF] i32 %val, %other-bcast-ptr
```
transformed into
```llvm
Live-ins:
%bcast-ptr = ptr [unit, VF]
...
%val = load i32 [unit, VF] %bcast-ptr
store [unit] i32 %val, %other-bcast-ptr
```
into
```llvm
Live-ins:
%bcast-ptr = ptr [unit, VF]
...
%val = load i32 [unit] %bcast-ptr
store [unit] i32 %val, %other-bcast-ptr
```
and lastly
```llvm
Live-ins:
%bcast-ptr = ptr [unit]
...
%val = load i32 [unit] %bcast-ptr
store [unit] i32 %val, %other-bcast-ptr
```
https://github.com/llvm/llvm-project/pull/227761
More information about the llvm-commits
mailing list