aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2021-04-07 10:03:22 +0100
committerFraser Cormack <fraser@codeplay.com>2021-04-08 09:46:38 +0100
commita5693445cac05238559f3d957918b22b8ea02310 (patch)
tree53f8b541d9107e335b786615da99facc66a7a8c6 /flang/lib/Frontend/CompilerInvocation.cpp
parent8fcb114d002bf7cd61309af80b26af68389944d0 (diff)
downloadllvm-a5693445cac05238559f3d957918b22b8ea02310.zip
llvm-a5693445cac05238559f3d957918b22b8ea02310.tar.gz
llvm-a5693445cac05238559f3d957918b22b8ea02310.tar.bz2
[RISCV] Support OR/XOR/AND reductions on vector masks
This patch adds RVV codegen support for OR/XOR/AND reductions for both scalable- and fixed-length vector types. There are a few possible codegen strategies for each -- vmfirst.m, vmsbf.m, and vmsif.m could be used to some extent -- but the vpopc.m instruction was chosen since it produces the scalar result in one instruction, after which scalar instructions can finish off the computation. The reductions are lowered identically for both scalable- and fixed-length vectors, although some alternate strategies may be more optimal on fixed-length vectors since it's cheaper to get the length of those types. Other reduction types were not deemed to be relevant for mask vectors. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100030
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions