[PATCH] D122789: [compiler-rt] [scudo] Use -mcrc32 on x86 when available

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 15:35:33 PDT 2022


MaskRay added a comment.

This is to kurly (original Gentoo reporter)
`printf '#include <smmintrin.h>\n#include <stdint.h>\nuint32_t computeHardwareCRC32(uint32_t Crc, uint32_t Data) { return _mm_crc32_u32(Crc, Data); }' > a.c`

`clang -m32 -march=i686 -msse4.2 -c a.c` seems to compile fine.
I have some older GCC and latest GCC (2022-04, multilib), `gcc -m32 -march=i686 -msse4.2 -c a.c`  builds while `-mcrc32` doesn't.

I suspect we should revert the `-mcrc32` change. The `__CRC32__` macro may be fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122789/new/

https://reviews.llvm.org/D122789



More information about the cfe-commits mailing list