[all-commits] [llvm/llvm-project] 7be5da: [InstCombine] Change (add x, c) to (xor x, c) (#75...

Fujun Han via All-commits all-commits at lists.llvm.org
Thu Dec 14 05:19:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7be5dabbc26a5e42dab82e6502c5d9a38e0e3b72
      https://github.com/llvm/llvm-project/commit/7be5dabbc26a5e42dab82e6502c5d9a38e0e3b72
  Author: Fujun Han <peter9606 at hotmail.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/test/Transforms/InstCombine/and.ll
    A llvm/test/Transforms/InstCombine/pr75129.ll

  Log Message:
  -----------
  [InstCombine] Change (add x, c) to (xor x, c) (#75129)

Change (add x, c) to (xor x, c) iff c is constant and c equals the top bit of the demanded bits.
Alive2: https://alive2.llvm.org/ce/z/DKmkwF

---------

Signed-off-by: Peter Han <fujun.han at iluvatar.com>
Co-authored-by: Peter Han <fujun.han at iluvatar.com>




More information about the All-commits mailing list