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

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 02:20:36 PDT 2023


benshi001 created this revision.
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 (mul x, imm) to (ADD/SUB (SLLI x, s0), (SLLI x, s1))
if possible.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147692

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147692.511331.patch
Type: text/x-patch
Size: 5490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230406/1cb61e5a/attachment.bin>


More information about the llvm-commits mailing list