[PATCH] D139299: [Instcombine] Canonicalize xor to or for two logical-select case

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 17:55:33 PST 2022


bcl5980 added a comment.

In D139299#3975362 <https://reviews.llvm.org/D139299#3975362>, @spatel wrote:

> Was there a problem with D139300 <https://reviews.llvm.org/D139300>? That is the same transform as this, but coded differently, right? I find that version easier to read even if it repeats the match for ~xor.

The original idea is this patch do
~((A & B) ^ (A | ?)) -> (A & B) | ~(A | ?)

D139300 <https://reviews.llvm.org/D139300> do
~(A & B) ^ (A | ?) -> (A & B) | ~(A | ?)

Then I find this patch can cover D139300 <https://reviews.llvm.org/D139300>, so I abandon D139300 <https://reviews.llvm.org/D139300>.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139299/new/

https://reviews.llvm.org/D139299



More information about the llvm-commits mailing list