mclow.lists closed this revision.
mclow.lists added a comment.
Landed as r339943
https://reviews.llvm.org/D50815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tra added a comment.
It appears that libcxx/include/CMakeLists.txt needs to be updated to include
`bit` file into the file set.
https://reviews.llvm.org/D50815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/ma
vitalybuka reopened this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.
Reverted r339971 as it breaks sanitizer bots
https://reviews.llvm.org/D50815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
mclow.lists closed this revision.
mclow.lists added a comment.
landed as revision 339943
https://reviews.llvm.org/D50815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
craig.topper added inline comments.
Comment at: include/bit:163
+ static_assert(sizeof(unsigned long long) == 8, "");
+ return __popcnt64(__x);
+#endif
I don't think __popcnt64 exists in MSVC when targeting 32-bit mode.
https://reviews.llvm.org/D50815
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?
h
lebedev.ri added inline comments.
Comment at: include/bit:99
+ unsigned long where;
+ // Search from LSB to MSB for first set bit.
+ // Returns zero if no set bit is found.
Pretty sure this is the other way around here.
```
// Search from MSB to LSB for first
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D50815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
mclow.lists created this revision.
mclow.lists added reviewers: EricWF, ldionne.
Herald added a subscriber: christof.
In C++20, we're going to have a header named for bit manipulations.
See https://wg21.link/P0553 and https://wg21.link/P0556 for more info.
This doesn't do any of that.
It just cr