[all-commits] [llvm/llvm-project] 904ac6: [InstCombine] Fold ((A&B)^A)|((A&B)^B) to A^B

Marc Auberer via All-commits all-commits at lists.llvm.org
Thu Sep 7 17:42:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 904ac6fe6b95517a9d8df7e2dcb2425bf773f347
      https://github.com/llvm/llvm-project/commit/904ac6fe6b95517a9d8df7e2dcb2425bf773f347
  Author: Marc Auberer <marc.auberer at chillibits.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/or-xor-xor.ll

  Log Message:
  -----------
  [InstCombine] Fold ((A&B)^A)|((A&B)^B) to A^B

Depends on D159379

((A & B) ^ A) | ((A & B) ^ B) -> A ^ B
(A ^ (A & B)) | (B ^ (A & B)) -> A ^ B
((A & B) ^ B) | ((A & B) ^ A) -> A ^ B
(B ^ (A & B)) | (A ^ (A & B)) -> A ^ B

Alive2: https://alive2.llvm.org/ce/z/i44xmq
Baseline tests: https://reviews.llvm.org/D159379

Reviewed By: huihuiz

Differential Revision: https://reviews.llvm.org/D159380




More information about the All-commits mailing list