[PATCH] D155772: [RISCV][GlobalISel] Legalize bitshift instructions for narrow types

Nitin John Raj via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 19:44:21 PDT 2023


nitinjohnraj created this revision.
nitinjohnraj added reviewers: craig.topper, arsenm.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
nitinjohnraj requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay, wdng.
Herald added a project: LLVM.

Legalize G_SHL, G_ASHR and G_LSHR for types narrower and upto XLen (i8,
i16 and i32 for rv32 and additionally i64 for rv64). This requires
adding some rules to handle G_ANYEXT, G_ZEXT and G_SEXT.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155772

Files:
  llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-ashr.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-lshr.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-shl.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-ashr.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-lshr.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-shl.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155772.542282.patch
Type: text/x-patch
Size: 18659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/75cd3263/attachment.bin>


More information about the llvm-commits mailing list