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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 09:16:26 PDT 2021


spatel added a comment.

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

> If we are talking about including boolean logic solver to AIC, the main question is its compile-time impact therefore. At present, IC and AIC are separated as "linear" and "non-linear", but "-O2" vs "-O3" criteria may be more appropriate.

I was just considering the option of putting this pattern matching in AIC since it is bigger than usual (and seems likely to be extremely rare in code). 
We do have semi-standard pattern matching in AIC outside of the TruncInstCombiner - it lives under "foldUnusualPatterns()".

A real logic solver should be its own pass if that would have practically no overlap with the pattern-matching of AIC/IC.


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

https://reviews.llvm.org/D112276



More information about the llvm-commits mailing list