[PATCH] D139630: [InstCombine] Fold logic-and/logic-or by distributive laws part2

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 06:38:13 PST 2022


bcl5980 created this revision.
bcl5980 added reviewers: spatel, lebedev.ri, RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Follow up https://reviews.llvm.org/D139408, support `and/or+select+select` patterns
X && Z || Y && Z --> (X || Y) && Z
https://alive2.llvm.org/ce/z/3kvwWm

(X || Z) && (Y || Z) --> (X && Y) || Z
https://alive2.llvm.org/ce/z/WFscD7


https://reviews.llvm.org/D139630

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/select-factorize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139630.481263.patch
Type: text/x-patch
Size: 8679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221208/94b34544/attachment.bin>


More information about the llvm-commits mailing list