<bit>: popcount()
does not utilize cnt
instruction on arm64
#1924
Labels
popcount()
does not utilize cnt
instruction on arm64
#1924
The bug
std::popcount()
uses the slow fallback implementation on arm64 because there is no variant utilizing thecnt
instruction (like there is for x64 avx usingpopcnt
).which compiles to (cl -O2 /std:c++latest):
Expected behavior
The
cnt
instruction should be utilized, resulting in something similar to (gcc -O2 -std=c++20):godbolt sample
The text was updated successfully, but these errors were encountered: