[PATCH] D147406: [LoongArch] Optimize multiplication with immediates

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 2 01:29:49 PDT 2023


benshi001 created this revision.
benshi001 added reviewers: SixWeining, XiaodongLoong, xen0n, wangleiat.
Herald added a subscriber: hiraditya.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Herald added a project: LLVM.

Optimize 'x * c' to (ALSL x, (SLLI x, i0), i1) in which
c = (1 << i0) | (1 << i1).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147406

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147406.510318.patch
Type: text/x-patch
Size: 4189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230402/040a141d/attachment.bin>


More information about the llvm-commits mailing list