Skip to content

Commit

Permalink
Allow compilation of AVX2 on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
malaterre committed May 30, 2024
1 parent f52f7d8 commit abda718
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hwy/detect_targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@
#define HWY_BROKEN_CLANG6 0
#endif

// 32-bit may fail to compile AVX2/3.
// 32-bit may fail to compile AVX2/3. GCC-13 was found ok
#if HWY_ARCH_X86_32
#define HWY_BROKEN_32BIT (HWY_AVX2 | (HWY_AVX2 - 1))
#else
#if (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL >= 1300)
#define HWY_BROKEN_32BIT 0
#else
#define HWY_BROKEN_32BIT (HWY_AVX2 | (HWY_AVX2 - 1))
#endif
#endif

// MSVC AVX3 support is buggy: https://github.com/Mysticial/Flops/issues/16
Expand Down

0 comments on commit abda718

Please sign in to comment.