[PATCH] D105785: [RISCV] Add a helper function to allow ReplaceNodeResults to use sign extension for any_extend of i32 constants.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 11 12:58:51 PDT 2021


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

any_extend is constant folded as zero extension, but that's not
ideal for RISCV.

Use the helper for shifts, rotates, and uaddo/usubo. There are
still more cases to update, but we need tests first.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105785

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/alu32.ll
  llvm/test/CodeGen/RISCV/rv64zbb-zbp.ll
  llvm/test/CodeGen/RISCV/xaluo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105785.357816.patch
Type: text/x-patch
Size: 10520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210711/18f4da1b/attachment.bin>


More information about the llvm-commits mailing list