[PATCH] D147296: [InstCombine] Add support for max(a, b) + min(a, b) => a + b.
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 20:50:29 PDT 2023
skatkov created this revision.
skatkov added reviewers: spatel, nikic, lebedev.ri, RKSimon, dantrushin, mkazantsev, fhahn, efriedma.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
skatkov requested review of this revision.
Herald added a project: LLVM.
The same optimization for
max(a,b) * min(a,b) => a * b
is added.
https://reviews.llvm.org/D147296
Files:
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/add-min-max.ll
llvm/test/Transforms/InstCombine/mul-min-max.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147296.509892.patch
Type: text/x-patch
Size: 5488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230331/964426e1/attachment.bin>
More information about the llvm-commits
mailing list