diff options
author | Fraser Cormack <fraser@codeplay.com> | 2021-08-11 16:47:12 +0100 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2021-09-02 10:15:53 +0100 |
commit | ef78f2106cd7d5bf9afeaaf030dc4e0d241f7ea3 (patch) | |
tree | 7f9e517f118016ff12ddcaf195b232bd03850f0c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | ea2cdbf5e655ce157c2224f7d427229be55551cc (diff) | |
download | llvm-ef78f2106cd7d5bf9afeaaf030dc4e0d241f7ea3.zip llvm-ef78f2106cd7d5bf9afeaaf030dc4e0d241f7ea3.tar.gz llvm-ef78f2106cd7d5bf9afeaaf030dc4e0d241f7ea3.tar.bz2 |
[LegalizeTypes][VP] Add splitting support for binary VP ops
This patch extends D107904's introduction of vector-predicated (VP)
operation legalization to include vector splitting.
When the result of a binary VP operation needs splitting, all of its
operands are split in kind. The two operands and the mask are split as
usual, and the vector-length parameter EVL is "split" such that the low
and high halves each execute the correct number of elements.
Tests have been added to the RISC-V target to show splitting several
scenarios for fixed- and scalable-vector types. Without support for
`umax` (e.g. in the `B` extension) the generated code starts to branch.
Ideally a cost model would prevent their insertion in the first place.
Through these tests many opportunities for better codegen can be seen:
combining known-undef VP operations and for constant-folding operations
on `ISD::VSCALE`, to name but a few.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D107957
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions