[PATCH] D50815: Establish the <bit> header

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 15 23:37:16 PDT 2018


craig.topper added inline comments.


================
Comment at: include/bit:145
+  static_assert(sizeof(unsigned) == 4, "");
+  return __popcnt(__x);
+#endif
----------------
How does this work on pre-Haswell X86 CPUs? Doesn't MSVC just blindly emit the popcnt instruction when it sees this?


https://reviews.llvm.org/D50815





More information about the cfe-commits mailing list