OSDN Git Service

PR target/59839
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / ssse3-phsubw.c
index eb26fa1..f3dbf9c 100644 (file)
@@ -1,12 +1,21 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
-#include "ssse3-check.h"
+#ifndef CHECK_H
+#define CHECK_H "ssse3-check.h"
+#endif
+
+#ifndef TEST
+#define TEST ssse3_test
+#endif
+
+#include CHECK_H
 #include "ssse3-vals.h"
 
 #include <tmmintrin.h>
 
+#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phsubw (int *i1, int *i2, int *r)
@@ -16,6 +25,7 @@ ssse3_test_phsubw (int *i1, int *i2, int *r)
   *(__m64 *) r = _mm_hsub_pi16 (t1, t2);
   _mm_empty ();
 }
+#endif
 
 /* Test the 128-bit form */
 static void
@@ -44,7 +54,7 @@ compute_correct_result (int *i1, int *i2, int *r)
 }
 
 static void
-ssse3_test (void)
+TEST (void)
 {
   int i;
   int r [4] __attribute__ ((aligned(16)));
@@ -56,10 +66,12 @@ ssse3_test (void)
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
+#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phsubw (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phsubw (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
+#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phsubw128 (&vals[i + 0], &vals[i + 4], r);