[PATCH] D143621: [LoongArch] Implement the convertSelectOfConstantsToMath hook

Gong LingQin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 18:46:23 PST 2023


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

Normally, the ISD::SELECT is lowered to maskeqz + masknez. This is
inefficient when operands are constants that can be computed easily.
To avoid that, override TargetLowering::convertSelectOfConstantsToMath.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143621

Files:
  llvm/lib/Target/LoongArch/LoongArchISelLowering.h
  llvm/test/CodeGen/LoongArch/select-const.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143621.496000.patch
Type: text/x-patch
Size: 13120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230209/39d75f5d/attachment.bin>


More information about the llvm-commits mailing list