diff --git a/src/sna/compiler.h b/src/sna/compiler.h index 44d17dbd..eaabf833 100644 --- a/src/sna/compiler.h +++ b/src/sna/compiler.h @@ -63,16 +63,16 @@ #define sse4_2 __attribute__((target("sse4.2,sse2,fpmath=sse"))) #endif -#if HAS_GCC(4, 7) -#define avx2 __attribute__((target("avx2,sse4.2,sse2,fpmath=sse"))) -#endif - #if HAS_GCC(4, 6) && defined(__OPTIMIZE__) #define fast __attribute__((optimize("Ofast"))) #else #define fast #endif +#if HAS_GCC(4, 7) +#define avx2 fast __attribute__((target("avx2,avx,sse4.2,sse2,fpmath=sse"))) +#endif + #if HAS_GCC(4, 6) && defined(__OPTIMIZE__) #define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops"))) #elif HAS_GCC(4, 5) && defined(__OPTIMIZE__)