From 0bcc3ef02c48edbf838e2665c096cc5cf5cc50c0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 24 Apr 2015 12:32:19 +0100 Subject: [PATCH] sna: Mark avx as being a subset of avx2 optimisations Signed-off-by: Chris Wilson --- src/sna/compiler.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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__)