[all-commits] [llvm/llvm-project] 447a44: [InstSimplify] Fold (ctpop(X) == N) || (X != 0) in...

Hirochika Matsumoto via All-commits all-commits at lists.llvm.org
Mon Apr 4 07:25:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 447a4485c56641b57f762d87dc2f11da8801d75c
      https://github.com/llvm/llvm-project/commit/447a4485c56641b57f762d87dc2f11da8801d75c
  Author: Hirochika Matsumoto <git at hkmatsumoto.com>
  Date:   2022-04-04 (Mon, 04 Apr 2022)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/and-or-icmp-ctpop.ll

  Log Message:
  -----------
  [InstSimplify] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0

(ctpop(X) == N) || (X != 0) --> (X != 0) https://alive2.llvm.org/ce/z/udgUVV
(ctpop(X) != N) && (X == 0) --> (X == 0) https://alive2.llvm.org/ce/z/9dq-cR

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




More information about the All-commits mailing list