[llvm] [InstCombine] Add ctpop(A | B) + ctpop(A & B) -> ctpop(A) + ctpop(B) (PR #79089)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 19:59:57 PST 2024


================
@@ -1718,6 +1718,25 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) {
         Builder.CreateIntrinsic(Intrinsic::umax, {I.getType()}, {A, B}));
   }
 
+  // ctpop(A | B) + ctpop(A & B) -> ctpop(A) + ctpop(B)
----------------
dtcxzyw wrote:

Alive2 proofs?

https://github.com/llvm/llvm-project/pull/79089


More information about the llvm-commits mailing list