aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2022-05-05 07:35:09 -0700
committerPhilip Reames <preames@rivosinc.com>2022-05-05 07:39:45 -0700
commit042a7a5f0da8beb89cbbfe2f1c3a155e654d9375 (patch)
tree904d9a7c8bc7c66665710bf33170fd9fd622e0b7 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parentc7a6b11b7e2ca40d9a0406d5db9cc122e5091023 (diff)
downloadllvm-042a7a5f0da8beb89cbbfe2f1c3a155e654d9375.zip
llvm-042a7a5f0da8beb89cbbfe2f1c3a155e654d9375.tar.gz
llvm-042a7a5f0da8beb89cbbfe2f1c3a155e654d9375.tar.bz2
[riscv] Use X0 for destination of VSETVLI instruction if result unused
If the GPR destination register of a VSETVLI instruction is unused, we can replace it with X0. This discards the result, and thus reduces register pressure. Since after the core insertion/lowering algorithm has run, many user written VSETVLIs will have their GPR result unused (as VTYPE/VLEN is now explicitly read instead), this kicks in for most tests which involve a vsetvli intrinsic for fixed length vectorization. (vscale vectorization generally uses the GPR result to know how far to e.g. advance pointers in a loop and these uses are not removed.) When inserting VSETVLIs to lower psuedos, we prefer the X0 form anyways. Differential Revision: https://reviews.llvm.org/D124961
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions