[PATCH] D113216: [InstCombine] (~(a | b) & c) | ~(a | b | c) -> ~(a | b)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 05:37:07 PST 2021


spatel added a comment.

As discussed in D114462 <https://reviews.llvm.org/D114462>, I noticed a pair of missing 'xor' simplifications based on these patterns, so I added those with:
892648b18a8c <https://reviews.llvm.org/rG892648b18a8cc3b8a08528112adfa74bdd432f8b>
b326c058146f <https://reviews.llvm.org/rGb326c058146fbd5d89f7c8ce9fb932b3851200d7>

So we probably want to add some or all of these tests under "test/Transforms/PhaseOrdering" to see if these are reduced with the default -O2/-O3 pipelines or some combination of specific passes (-reassociate, -gvn, -instcombine).

This patch could also be moved to -instsimplify if it is still needed. But I think that would really be covering up a shortcoming of -reassociate. That pass should find the common 'or' or 'and' value in these patterns?


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

https://reviews.llvm.org/D113216



More information about the llvm-commits mailing list