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 216a960
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hwy/detect_targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@

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

0 comments on commit 216a960

Please sign in to comment.