[llvm] [RISCV] Select disjoint_or+not as xnor. (PR #147636)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 07:55:09 PDT 2025
topperc wrote:
> > I changed the existing xnor pattern to have the not on the outside
> > instead of the inside. These are equivalent for xor since xor is
> > associative. Tablegen was already generating multiple variants
> > of the isel pattern using associativity.
>
> Associativity means `(x ^ (y ^ -1)) == ((x ^ y) ^ -1)`. I assume Tablegen also knows that xor is commutative: `(x ^ y ^ -1) == (x ^ -1 ^ y)` ?
It does.
https://github.com/llvm/llvm-project/pull/147636
More information about the llvm-commits
mailing list