[PATCH] D68189: [InstCombine] recognize popcount implemented in hacker's delight.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 07:50:21 PDT 2019


spatel added a comment.

In D68189#1688114 <https://reviews.llvm.org/D68189#1688114>, @xbolva00 wrote:

> I meant something like in foldAnyOrAllBitsSet. Final lshr is ok to have multiple uses, all partial computations should be m_Oneuse.


I don't think that's necessary for this transform. The difference is we are only creating a single instruction for this transform. Therefore, we can always replace the final instruction in the sequence with some other instruction without producing any extra instructions overall.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68189/new/

https://reviews.llvm.org/D68189





More information about the llvm-commits mailing list