[PATCH] D99042: [RISCV] Teach targetShrinkDemandedConstant to preserve (and X, 0xffffffff).

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 21 13:13:18 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: asb, luismarques, frasercrmck, jrtc27.
Herald added subscribers: StephenFan, vkmr, evandro, 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.

We look for this pattern frequently in isel patterns so its a
good idea to try to preserve it.

This also let's us remove our special isel handling for srliw
and use a direct pattern match of (srl (and X, 0xffffffff), C)
since no bits will be removed from the and mask.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99042

Files:
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/lib/Target/RISCV/RISCVInstrInfoB.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99042.332175.patch
Type: text/x-patch
Size: 5832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210321/2cf69ced/attachment.bin>


More information about the llvm-commits mailing list