[llvm] [RISCV] Select disjoint_or+not as xnor. (PR #147636)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 01:14:13 PDT 2025
pfusik 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)` ?
https://github.com/llvm/llvm-project/pull/147636
More information about the llvm-commits
mailing list