[PATCH] D158983: [InstCombine] Fold two select patterns into or-and

Yingwei Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 06:26:06 PDT 2023

dtcxzyw created this revision.
dtcxzyw added reviewers: bcl5980, spatel, RKSimon, nikic, craig.topper.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
dtcxzyw requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch is the follow-up improvement of D122152 <https://reviews.llvm.org/D122152>.
Fixes https://github.com/llvm/llvm-project/issues/64558.

`select (a | ~c), a, b -> or a, (and c, freeze(b))`
`select (c & ~b), a, b -> or b, (and freeze(a), c)`
Alive2: https://alive2.llvm.org/ce/z/x8ZSY9

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158983.553907.patch
Type: text/x-patch
Size: 6608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230828/cc1b81f4/attachment.bin>

More information about the llvm-commits mailing list