This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATH: Add -mtune=generic to 256bit AVX tests
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Oct 2010 06:07:30 -0700
- Subject: PATH: Add -mtune=generic to 256bit AVX tests
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
I checked in this patch to add -mtune=generic to 256bit AVX tests.
Otherwise, we get a failure when gcc is configured --with-cpu=atom
since -mtune=atom will turn off double vectorizer.
H.J.
---
Index: gcc.target/i386/recip-vec-divf-avx.c
===================================================================
--- gcc.target/i386/recip-vec-divf-avx.c (revision 165465)
+++ gcc.target/i386/recip-vec-divf-avx.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mfpmath=sse -mrecip" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mtune=generic -mfpmath=sse -mrecip" } */
float a[16];
float b[16];
Index: gcc.target/i386/avx-copysignf-vec.c
===================================================================
--- gcc.target/i386/avx-copysignf-vec.c (revision 165465)
+++ gcc.target/i386/avx-copysignf-vec.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
#include "avx-check.h"
Index: gcc.target/i386/vectorize4-avx.c
===================================================================
--- gcc.target/i386/vectorize4-avx.c (revision 165465)
+++ gcc.target/i386/vectorize4-avx.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mtune=generic" } */
extern double sqrt (double __x);
Index: gcc.target/i386/pr44144.c
===================================================================
--- gcc.target/i386/pr44144.c (revision 165465)
+++ gcc.target/i386/pr44144.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
void
foo (char * dest, int xcount, int ycount)
Index: gcc.target/i386/pr44180.c
===================================================================
--- gcc.target/i386/pr44180.c (revision 165465)
+++ gcc.target/i386/pr44180.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
#include "avx-check.h"
Index: gcc.target/i386/vect-sizes-1.c
===================================================================
--- gcc.target/i386/vect-sizes-1.c (revision 165465)
+++ gcc.target/i386/vect-sizes-1.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -ffast-math -mavx" } */
+/* { dg-options "-O3 -ffast-math -mavx -mtune=generic" } */
double a[1024];
Index: gcc.target/i386/pr44130.c
===================================================================
--- gcc.target/i386/pr44130.c (revision 165465)
+++ gcc.target/i386/pr44130.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-32,\[\\t \]*%\[re\]?sp" } } */
/* { dg-final { scan-assembler "vmovaps\[\\t \]*%ymm" } } */
Index: gcc.target/i386/recip-vec-sqrtf-avx.c
===================================================================
--- gcc.target/i386/recip-vec-sqrtf-avx.c (revision 165465)
+++ gcc.target/i386/recip-vec-sqrtf-avx.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mfpmath=sse -mrecip" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mtune=generic -mfpmath=sse -mrecip" } */
float a[16];
float b[16];
Index: gcc.target/i386/avx-copysign-vec.c
===================================================================
--- gcc.target/i386/avx-copysign-vec.c (revision 165465)
+++ gcc.target/i386/avx-copysign-vec.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -ftree-vectorize -mavx" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
#include "avx-check.h"
Index: ChangeLog
===================================================================
--- ChangeLog (revision 165465)
+++ ChangeLog (working copy)
@@ -1,3 +1,15 @@
+2010-10-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/avx-copysign-vec.c: Add -mtune=generic.
+ * gcc.target/i386/avx-copysignf-vec.c: Likewise.
+ * gcc.target/i386/pr44130.c: Likewise.
+ * gcc.target/i386/pr44144.c: Likewise.
+ * gcc.target/i386/pr44180.c: Likewise.
+ * gcc.target/i386/recip-vec-divf-avx.c: Likewise.
+ * gcc.target/i386/recip-vec-sqrtf-avx.c: Likewise.
+ * gcc.target/i386/vect-sizes-1.c: Likewise.
+ * gcc.target/i386/vectorize4-avx.c: Likewise.
+
2010-10-14 Richard Guenther <rguenther@suse.de>
PR lto/44561