[PATCH] D69334: [MathExtras] Add intrinsic for the PopulationCounter in Visual Studio

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 16:41:02 PDT 2019


craig.topper added a comment.

In D69334#1724314 <https://reviews.llvm.org/D69334#1724314>, @ekatz wrote:

> In D69334#1719297 <https://reviews.llvm.org/D69334#1719297>, @craig.topper wrote:
>
> > I'm pretty sure MSVC will always turn this into a popcnt instruction on X86. It has no fall back because MSVC doesn't have a concept of a target CPU. So this would only work on a Nehalem or newer CPU that implements the instruction.
>
>
> Actually, it seems MSVC never does that optimization. Not on 32-bit or 64-bit.


Never does what optimization?

> Regarding the supported CPU issue; Nehalem is over a decade old. How far back do we want to support? I think it is reasonable to assume `popcnt` is always ava


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69334





More information about the llvm-commits mailing list