diff options
author | Philip Reames <preames@rivosinc.com> | 2022-12-19 13:56:01 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2022-12-19 14:17:26 -0800 |
commit | 828b1c55cb7f5b327ea7399bc6f6386ecad14972 (patch) | |
tree | cd4528c9ac386c885ba512db19425cc7140a9bfa /clang/lib/Frontend/ModuleDependencyCollector.cpp | |
parent | 30199d11d27460e8c96a81c493526c32dbea428d (diff) | |
download | llvm-828b1c55cb7f5b327ea7399bc6f6386ecad14972.zip llvm-828b1c55cb7f5b327ea7399bc6f6386ecad14972.tar.gz llvm-828b1c55cb7f5b327ea7399bc6f6386ecad14972.tar.bz2 |
[RISCV] Match neg (and x, 1) to two shifts to improve codesize
The negate operation is never compressible (as the destination and rs1 register must differ). The two shift versions will be equal size if the input GPR is reused, or smaller if this is the only use of the input.
For clarity, the operation being performed is (select (low-bit-of x), -1, 0).
Differential Revision: https://reviews.llvm.org/D140319
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions