[PATCH] D139076: [InstCombine] fold icmp + select pattern by distributive laws

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 22:43:46 PST 2022


bcl5980 created this revision.
bcl5980 added reviewers: RKSimon, spatel.
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.

`C ? (Y != X) : (Z != X) --> (C ? Y : Z) != X`
`C ? (Y == X) : (Z == X) --> (C ? Y : Z) == X`

https://alive2.llvm.org/ce/z/-frXfs


https://reviews.llvm.org/D139076

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139076.479173.patch
Type: text/x-patch
Size: 7367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221201/597d96c8/attachment.bin>


More information about the llvm-commits mailing list