[PATCH] D112276: [InstCombine] Fold `(c & ~(a | b)) | (b & ~(a | c))` to `~a & (b ^ c)`

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 11:20:00 PDT 2021


rampitec added a comment.

In D112276#3084845 <https://reviews.llvm.org/D112276#3084845>, @anton-afanasyev wrote:

> In D112276#3084757 <https://reviews.llvm.org/D112276#3084757>, @spatel wrote:
>
>> We do have semi-standard pattern matching in AIC outside of the TruncInstCombiner - it lives under "foldUnusualPatterns()".
>
> Oh, sure, forget about it, it has only few folding patterns. As for this, I vote for moving such large boolean pattern to AIC, at least, if we do not need it at "O2 <https://reviews.llvm.org/owners/package/2/>" right now.

On the other hand being in IC and dealing with AND and OR operations as a root these patterns can benefit from running `matchDeMorgansLaws()` which is not available in the AIC.


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

https://reviews.llvm.org/D112276



More information about the llvm-commits mailing list