[PATCH] D122458: [RISCV][WIP] Enable TargetLowering::hasBitTest for masks that fit in ANDI.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 21:53:52 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: Miss_Grape, spatel, lebedev.ri.
Herald added subscribers: s, VincentWu, luke957, StephenFan, vkmr, frasercrmck, ecnelises, evandro, luismarques, apazos, sameer.abuasal, steven.zhang, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, 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.

Modified DAGCombiner to pass the shift the bittest input and the shift amount
to hasBitTest. This matches the other call to hasBitTest in TargetLowering.h

This is an alternative to D122454 <https://reviews.llvm.org/D122454>. Need to more testing, but wanted to put it out there.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122458

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/rv32zbs.ll
  llvm/test/CodeGen/RISCV/rv64zbs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122458.418129.patch
Type: text/x-patch
Size: 7252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220325/e7e8ebd4/attachment.bin>


More information about the llvm-commits mailing list