aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-09-12 09:12:56 -0700
committerCraig Topper <craig.topper@sifive.com>2022-09-12 09:13:07 -0700
commit4186a49d793eb69afee7a724dad87a8ecd434e51 (patch)
tree7ed0c56c22806de8c4ca3c0cc4b5ee9bdf3ec3cb /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentc1502425ba2d10d75c35e8c00a29aabd8c8e59ba (diff)
downloadllvm-4186a49d793eb69afee7a724dad87a8ecd434e51.zip
llvm-4186a49d793eb69afee7a724dad87a8ecd434e51.tar.gz
llvm-4186a49d793eb69afee7a724dad87a8ecd434e51.tar.bz2
[RISCV] Custom type legalize i32 loads by sign extending.
The default is to use extload which can become a zextload or sextload if it is followed by an 'and' or sext_inreg. Sometimes type legalization will introduce an 'and' from promoting something like 'srl X, C' and a sext_inreg from from a setcc. The 'and' could be freely folded with the promoted 'srl' by using srliw, but the sext_inreg can't be folded into a compare. DAG combiner will see both of these choices and may decide to fold the 'and' instead of the 'sext_inreg'. This forces the sext_inreg to become a sext.w. By picking sextload in the type legalizer we take this choice away. Looking at spec2006 compiled with Zba and Zbb this appeared to be net reduction in lines of code in the objdump disassembly output. This is similar to what we do with i32 add/sub/mul/shl in type legalization where we always emit a sext_inreg. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D130397
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions