[PATCH] D124148: [RISCV] Add special case to constant materialization to remove trailing zeros first.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 23:19:41 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: asb, luismarques, jrtc27, frasercrmck.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

If there are fewer than 12 trailing zeros, we'll try to use an ADDI
at the end of the sequence. If we strip trailing zeros and end the
sequence with a SLLI we might find a shorter sequence.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124148

Files:
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
  llvm/test/CodeGen/RISCV/imm.ll
  llvm/test/CodeGen/RISCV/rv64zba.ll
  llvm/test/CodeGen/RISCV/rv64zbp.ll
  llvm/test/CodeGen/RISCV/vararg.ll
  llvm/test/MC/RISCV/rv64i-aliases-valid.s
  llvm/test/MC/RISCV/rv64zba-aliases-valid.s
  llvm/test/MC/RISCV/rv64zbs-aliases-valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124148.424101.patch
Type: text/x-patch
Size: 12697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220421/5863a426/attachment.bin>


More information about the llvm-commits mailing list