mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
non_temporal_store_memcpy_avx uses gnu::target("avx") to use AVX intrinsics
inside its function body even if the compiler was not configured for AVX
support. This is OK because non_temporal_store_memcpy_avx is guarded by a cpuid
check before it is called.
However, non_temporal_memcpy_test.cc performs no such cpuid guard. In practice,
nobody will really notice this bug as CPUs have had AVX for a long time by now.
That said, this does come up if one has compiled absl for x86_64 and runs the
binary on a arm64 Mac. This is because the Rosetta 2 emulation environment does
not support AVX or newer instructions.
PiperOrigin-RevId: 717991751
Change-Id: Id41bd186ebfd1cf7124ab5211fbfb74a01d5b56c