diff options
author | Fraser Cormack <fraser@codeplay.com> | 2021-08-05 13:54:37 +0100 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2021-09-23 11:11:05 +0100 |
commit | e7c879a69d6b61f35969936a9efd46bcfbf80ca0 (patch) | |
tree | d77ac4fb924eb54396fce6e62d8dd8d35c78296b /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | ce59ccd04023cab3a837da14079ca2dcbfebb70c (diff) | |
download | llvm-e7c879a69d6b61f35969936a9efd46bcfbf80ca0.zip llvm-e7c879a69d6b61f35969936a9efd46bcfbf80ca0.tar.gz llvm-e7c879a69d6b61f35969936a9efd46bcfbf80ca0.tar.bz2 |
[RISCV][VP] Add support for VP_REDUCE_* operations
This patch adds codegen support for lowering the vector-predicated
reduction intrinsics to RVV instructions. The process is similar to that
of the other reduction intrinsics, save for the fact that every VP
reduction has a start value. We reuse the existing custom "VL" nodes,
adding extra patterns where required to handle non-true masks.
To support these nodes, the `RISCVISD::VECREDUCE_*_VL` nodes have been
given an explicit "merge" operand. This is to faciliate the VP
reductions, where we must be careful to ensure that even if no operation
is performed (when VL=0) we still produce the start value. The RVV
reductions don't update the destination register under these conditions,
so we tie the splatted start value to the output register.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D107657
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions