[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 13:37:13 PDT 2021


spatel added a comment.

In D112276#3085576 <https://reviews.llvm.org/D112276#3085576>, @rampitec wrote:

> Thinking more about it moving these patterns into AIC is not really a good option. I moved it there and tests I wrote pass. But it will not work on the original code produced by the FE. These tests are already simplified by the IC, and AIC works before the first IC run, so it will miss these.

Yes, currently AIC is awkwardly placed in the pipeline. Thanks for checking it anyway and providing the motivating code. 
Regular instcombine seems fine for this patch for now, but we should stamp out more regression tests to make sure the commutes and uses are working as expected.


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

https://reviews.llvm.org/D112276



More information about the llvm-commits mailing list