Patchwork PATH: Add -mtune=generic to 256bit AVX tests

login
register
mail settings
Submitter H.J. Lu
Date Oct. 14, 2010, 1:07 p.m.
Message ID <20101014130730.GA23022@intel.com>
Download mbox | patch
Permalink /patch/67821/
State New
Headers show

Comments

H.J. Lu - Oct. 14, 2010, 1:07 p.m.
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.
---

Patch

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