Hacker News new | ask | show | jobs
by matthews2 736 days ago
You can use -mno-popcnt for this.

Godbolt: https://godbolt.org/z/raszoEedr

Reference: https://clang.llvm.org/docs/ClangCommandLineReference.html#c...

1 comments

This doesn't help help with ARM, which doesn't have a separate feature flag for popcount.
Oops, my bad. I was stuck in Intel land.

The option I linked is even listed under the x86-specific options...