[PATCH] D55935: [X86][SSE] Canonicalize OR(AND(X, C), AND(Y, ~C)) -> OR(AND(X, C), ANDNP(C, Y))

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 7 08:13:58 PST 2019


RKSimon added a comment.

In D55935#1340459 <https://reviews.llvm.org/D55935#1340459>, @spatel wrote:

> Would we better off doing a generic DAGCombine into the optimal xor-and-xor (aka, masked merge) pattern?
>  (x & C) | (y & ~C) --> ((x ^ y) & C) ^ y --> ((y ^ x) & ~C) ^ x


So do we agree that adding support for this additional pattern only makes sense if one of X or Y is being loaded (once)? It doesn't seem to matter if C is being reused or not.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55935





More information about the llvm-commits mailing list