[PATCH] D128191: [LoongArch] Combine ((x & shifted_mask) >> shamt) to bstrpick.{w/d}

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 05:54:03 PDT 2022


SixWeining created this revision.
SixWeining added reviewers: xen0n, MaskRay, rengolin, myhsu, xry111.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
SixWeining requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is an improvement to LoongArch codegen. In D127206 <https://reviews.llvm.org/D127206> we combined
((x >> shamt) & shifted_mask) to bstrpick and here we do a similar
combination when certain conditions are met.

Thanks to @xen0n for reminding me.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128191

Files:
  llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
  llvm/test/CodeGen/LoongArch/bstrpick_d.ll
  llvm/test/CodeGen/LoongArch/bstrpick_w.ll
  llvm/test/CodeGen/LoongArch/ir-instruction/lshr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128191.438359.patch
Type: text/x-patch
Size: 7521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220620/97a45cfa/attachment.bin>


More information about the llvm-commits mailing list