[PATCH] D125198: [InstCombine] ((A + B) + C) + A --> (A << 1) + (B + C)

Chenbing.Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 8 19:46:53 PDT 2022


Chenbing.Zheng created this revision.
Chenbing.Zheng added reviewers: spatel, RKSimon, benshi001.
Chenbing.Zheng added a project: LLVM.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Chenbing.Zheng requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.

This patch deal with 3 add sequences, which include the same op
in firse add and third add:
((A + B) + C) + A --> (A << 1) + (B + C)
((A + B) + C) + B --> (B << 1) + (A + C)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125198

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/test/Transforms/InstCombine/add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125198.427966.patch
Type: text/x-patch
Size: 4286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/13e3d726/attachment-0001.bin>


More information about the llvm-commits mailing list