diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2025-02-17 09:51:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-17 09:51:35 +0000 |
commit | e0e67a62076ad56f48c64a7cd2ebf5754b8326b7 (patch) | |
tree | 9ff0568a397e92b6e04ad4d2bda875aa42786f90 /llvm/docs/tutorial | |
parent | 262e4c19878175780c88da867e88fc4e202d4788 (diff) | |
download | llvm-e0e67a62076ad56f48c64a7cd2ebf5754b8326b7.zip llvm-e0e67a62076ad56f48c64a7cd2ebf5754b8326b7.tar.gz llvm-e0e67a62076ad56f48c64a7cd2ebf5754b8326b7.tar.bz2 |
[LV] Add initial support for vectorizing literal struct return values (#109833)
This patch adds initial support for vectorizing literal struct return
values. Currently, this is limited to the case where the struct is
homogeneous (all elements have the same type) and not packed. The users
of the call also must all be `extractvalue` instructions.
The intended use case for this is vectorizing intrinsics such as:
```
declare { float, float } @llvm.sincos.f32(float %x)
```
Mapping them to structure-returning library calls such as:
```
declare { <4 x float>, <4 x float> } @Sleef_sincosf4_u10advsimd(<4 x float>)
```
Or their widened form (such as `@llvm.sincos.v4f32` in this case).
Implementing this required two main changes:
1. Supporting widening `extractvalue`
2. Adding support for vectorized struct types in LV
* This is mostly limited to parts of the cost model and scalarization
Since the supported use case is narrow, the required changes are
relatively small.
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions