diff options
author | Craig Topper <craig.topper@sifive.com> | 2021-08-18 10:23:59 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2021-08-18 10:25:12 -0700 |
commit | 20e62658735a1b03ecadc3072593753abca21fd0 (patch) | |
tree | 7f519084ee4d98b519c21fadd6a9f37c66d3f707 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | d9ba1a9c5cac638a5cf3d23404509f7eeb434b7a (diff) | |
download | llvm-20e62658735a1b03ecadc3072593753abca21fd0.zip llvm-20e62658735a1b03ecadc3072593753abca21fd0.tar.gz llvm-20e62658735a1b03ecadc3072593753abca21fd0.tar.bz2 |
[RISCV] Improve constant materialization for stores of i16 or i32 negative constants.
DAGCombiner::visitStore can clear the upper bits of constants
used by stores. This leads prevents them from being recognized as
sign extended negative values making them more expensive to
materialize.
This patch uses the hasAllNBitUsers method from D107658 to make
a negative constant if none of the users care about the upper bits.
Reviewed By: luismarques
Differential Revision: https://reviews.llvm.org/D108052
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions