[PATCH] D65802: [DAGCombiner] Rebuild (setcc x, y, ==) from (xor (xor x, y), 1)

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 23:20:10 PDT 2019


rogfer01 marked an inline comment as done.
rogfer01 added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13495-13497
   // Transform br(xor(x, y)) -> br(x != y)
   // Transform br(xor(xor(x,y), 1)) -> br (x == y)
   if (N.getOpcode() == ISD::XOR) {
----------------
spatel wrote:
> That comment makes me nervous given the logic. Can we assert that N has one user and that user is a br?
I tried checking that the user is a `br` but then lots of other unrelated tests started failing.

I will look closer what is going on here.


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

https://reviews.llvm.org/D65802





More information about the llvm-commits mailing list