[PATCH] D121598: [RISCV] Select SRLI+SLLI for AND with leading ones mask

Haocong Lu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 05:55:19 PDT 2022


Luhaocong created this revision.
Luhaocong added reviewers: craig.topper, frasercrmck, jrtc27, luismarques, benshi001.
Luhaocong added a project: LLVM.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Herald added a project: All.
Luhaocong requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, jacquesguan, MaskRay.

Select SRLI+SLLI for AND if its second operand is a leading ones mask.
It's useful in RV64 when the mask cannot be generated by LUI.


https://reviews.llvm.org/D121598

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/test/CodeGen/RISCV/and.ll
  llvm/test/CodeGen/RISCV/copysign-casts.ll
  llvm/test/CodeGen/RISCV/double-arith.ll
  llvm/test/CodeGen/RISCV/double-bitmanip-dagcombines.ll
  llvm/test/CodeGen/RISCV/double-intrinsics.ll
  llvm/test/CodeGen/RISCV/float-arith.ll
  llvm/test/CodeGen/RISCV/float-bitmanip-dagcombines.ll
  llvm/test/CodeGen/RISCV/float-intrinsics.ll
  llvm/test/CodeGen/RISCV/half-arith.ll
  llvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll
  llvm/test/CodeGen/RISCV/half-intrinsics.ll
  llvm/test/CodeGen/RISCV/rem.ll
  llvm/test/CodeGen/RISCV/rv32zbp.ll
  llvm/test/CodeGen/RISCV/rv64zbp.ll
  llvm/test/CodeGen/RISCV/shift-and.ll
  llvm/test/CodeGen/RISCV/srem-lkk.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121598.415072.patch
Type: text/x-patch
Size: 27660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/92c4e21a/attachment.bin>


More information about the llvm-commits mailing list