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

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 02:45:05 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.

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

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

Fix: https://github.com/llvm/llvm-project/issues/53861


https://reviews.llvm.org/D139408

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139408.480406.patch
Type: text/x-patch
Size: 26609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221206/fad4ec4f/attachment.bin>


More information about the llvm-commits mailing list