diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-04-29 08:41:52 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-04-29 08:58:32 -0700 |
commit | 5c3837312503b4ef8443951194127c4ba2a03153 (patch) | |
tree | c01c6847fa21d7d24152b5f7fcfae6488b866501 /llvm/lib/Support/TargetParser.cpp | |
parent | d9c64d33b98be695fc78a65624242033058ed117 (diff) | |
download | llvm-5c3837312503b4ef8443951194127c4ba2a03153.zip llvm-5c3837312503b4ef8443951194127c4ba2a03153.tar.gz llvm-5c3837312503b4ef8443951194127c4ba2a03153.tar.bz2 |
[RISCV] Improve constant materialization for cases that can use LUI+ADDI instead of LUI+ADDIW.
It's possible that we have a constant that isn't simm32 so we can't
use LUI+ADDIW, but we can use LUI+ADDI. Because ADDI uses a sign
extended constant, it's possible that after subtracting it out, we
end up with a simm32 that maps to LUI.
This patch detects this case after removing Lo12 and before shifting
the value for SLLI.
Reviewed By: luismarques
Differential Revision: https://reviews.llvm.org/D124222
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
0 files changed, 0 insertions, 0 deletions