[PATCH] D136623: [InstCombine] enable more factorization in SimplifyUsingDistributiveLaws
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 10:24:35 PDT 2022
Allen created this revision.
Allen added reviewers: spatel, bcl5980, RKSimon, xbolva00.
Herald added subscribers: wenlei, hiraditya.
Herald added a project: All.
Allen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This is one of the IR transforms suggested in issue #57255, https://godbolt.org/z/P9rMGhTcE.
Now we already support to transform t*5 + t into t * (5+1), but not for t - 1 + 5 * t
so the patch try logic: (t-1)+(5*t) -> (t*5)+(t-1) -> (t*5+t)-1 = t*(5+1)-1
Depend D132412 <https://reviews.llvm.org/D132412>
https://reviews.llvm.org/D136623
Files:
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/PGOProfile/chr.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136623.470204.patch
Type: text/x-patch
Size: 4776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221024/dde82493/attachment.bin>
More information about the llvm-commits
mailing list