# compiler_rt: simplify popcount "magic constants" · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0550198c9877c37c53b67f853968e3e4ce89c2ef)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0550198c9877c37c53b67f853968e3e4ce89c2ef

Requested commit: 0550198c9877c37c53b67f853968e3e4ce89c2ef

Commit: 0550198c9877c37c53b67f853968e3e4ce89c2ef

Tree: 3815ddb4a3ceee8d5ca5f6c7c08a936505a49191

Author: Jan Philipp Hafer

Committer: Andrew Kelley

## Message

```
compiler_rt: simplify popcount "magic constants"

- magic constants are nicer to construct ie with
  (~@as(unsigned type, 0) / 3) == 0x55...55
- thanks to Stefan Kanthak for the idea

```

## Parents

- [eb1e75b2b8e788a3d5b590a0061cb736f8183fd3](https://git.cafe/gitcafe/zig/commit/eb1e75b2b8e788a3d5b590a0061cb736f8183fd3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0550198c9877c37c53b67f853968e3e4ce89c2ef?format=markdown)
