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

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 18:50:20 PDT 2019


shchenz added inline comments.


================
Comment at: llvm/include/llvm/IR/PatternMatch.h:664
 /// the value.
-inline specific_intval m_SpecificInt(uint64_t V) { return specific_intval(V); }
+inline specific_intval m_SpecificInt(APInt V) { return specific_intval(V); }
+
----------------
craig.topper wrote:
> Can we std::move this into specific_intval constructor and then std::move it again in the class. Otherwise we're making multiple heap allocations whenever the value is more the 64 bits.
Right. Thanks for pointing it out.


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

https://reviews.llvm.org/D68189





More information about the llvm-commits mailing list