[PATCH] D91479: [RISCV] Custom type legalize i32 fshl/fshr on RV64 with Zbt.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 14 00:18:22 PST 2020


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

This adds custom opcodes for FSLW/FSRW so we can type legalize
fshl/fshr without needing to match a sign_extend_inreg.

I've used the operand order from fshl/fshr to make the isel
pattern similar to the non-W form. It was also hard to decide
another order since the register instruction has the shift amount
as the second operand, but the immediate instruction has it as
the third operand.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91479

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoB.td
  llvm/test/CodeGen/RISCV/rv64Zbt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91479.305307.patch
Type: text/x-patch
Size: 9400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201114/538385b1/attachment.bin>


More information about the llvm-commits mailing list