diff mbox series

[testsuite] : Re-enable 64-bit form in gcc.target/i386/ssse3-*.c on AVX targets

Message ID CAFULd4akrdqArLVcYXRKv4wDsSxT-djo0AzVYnzZhdH-c2zALg@mail.gmail.com
State New
Headers show
Series [testsuite] : Re-enable 64-bit form in gcc.target/i386/ssse3-*.c on AVX targets | expand

Commit Message

Uros Bizjak Feb. 14, 2019, 9:57 p.m. UTC
2019-02-14  Uroš Bizjak  <ubizjak@gmail.com>

    * gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets.
    * gcc.target/i386/ssse3-pabsd.c: Ditto.
    * gcc.target/i386/ssse3-pabsw.c: Ditto.
    * gcc.target/i386/ssse3-palignr.c: Ditto.
    * gcc.target/i386/ssse3-phaddd.c: Ditto.
    * gcc.target/i386/ssse3-phaddsw.c: Ditto.
    * gcc.target/i386/ssse3-phaddw.c: Ditto.
    * gcc.target/i386/ssse3-phsubd.c: Ditto.
    * gcc.target/i386/ssse3-phsubsw.c: Ditto.
    * gcc.target/i386/ssse3-phsubw.c: Ditto.
    * gcc.target/i386/ssse3-pmaddubsw.c: Ditto.
    * gcc.target/i386/ssse3-pmulhrsw.c: Ditto.
    * gcc.target/i386/ssse3-pshufb.c: Ditto.
    * gcc.target/i386/ssse3-psignb.c: Ditto.
    * gcc.target/i386/ssse3-psignd.c: Ditto.
    * gcc.target/i386/ssse3-psignw.c: Ditto.

Tested on x86_64-linux-gnu {,-m32} w/ and w/o -mavx.

Committed to mainline SVN.

Uros.
diff mbox series

Patch

Index: gcc.target/i386/ssse3-pabsb.c
===================================================================
--- gcc.target/i386/ssse3-pabsb.c	(revision 268854)
+++ gcc.target/i386/ssse3-pabsb.c	(working copy)
@@ -15,7 +15,6 @@ 
 #include "ssse3-vals.h"
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pabsb (int *i1, int *r)
@@ -24,7 +23,6 @@ 
   *(__m64 *) r = _mm_abs_pi8 (t1);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -63,12 +61,10 @@ 
       /* Manually compute the result */
       compute_correct_result(&vals[i + 0], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_pabsb (&vals[i + 0], &r[0]);
       ssse3_test_pabsb (&vals[i + 2], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_pabsb128 (&vals[i + 0], r);
Index: gcc.target/i386/ssse3-pabsd.c
===================================================================
--- gcc.target/i386/ssse3-pabsd.c	(revision 268854)
+++ gcc.target/i386/ssse3-pabsd.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pabsd (int *i1, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_abs_pi32 (t1);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -62,12 +60,10 @@ 
       /* Manually compute the result */
       compute_correct_result(&vals[i + 0], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_pabsd (&vals[i + 0], &r[0]);
       ssse3_test_pabsd (&vals[i + 2], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_pabsd128 (&vals[i + 0], r);
Index: gcc.target/i386/ssse3-pabsw.c
===================================================================
--- gcc.target/i386/ssse3-pabsw.c	(revision 268854)
+++ gcc.target/i386/ssse3-pabsw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pabsw (int *i1, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_abs_pi16 (t1);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -64,12 +62,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_pabsw (&vals[i + 0], &r[0]);
       ssse3_test_pabsw (&vals[i + 2], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_pabsw128 (&vals[i + 0], r);
Index: gcc.target/i386/ssse3-palignr.c
===================================================================
--- gcc.target/i386/ssse3-palignr.c	(revision 268854)
+++ gcc.target/i386/ssse3-palignr.c	(working copy)
@@ -17,7 +17,6 @@ 
 #include <tmmintrin.h>
 #include <string.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_palignr (int *i1, int *i2, unsigned int imm, int *r)
@@ -82,7 +81,6 @@ 
 
    _mm_empty();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -214,7 +212,6 @@ 
       bout[i] = buf[imm + i];
 }
 
-#ifndef __AVX__
 static void
 compute_correct_result_64 (int *i1, int *i2, unsigned int imm, int *r)
 {
@@ -242,7 +239,6 @@ 
     else
       bout[i + 8] = buf[imm + i];
 }
-#endif
 
 static void
 TEST (void)
@@ -256,7 +252,6 @@ 
   for (i = 0; i < 256; i += 8)
     for (imm = 0; imm < 100; imm++)
       {
-#ifndef __AVX__
 	/* Manually compute the result */
 	compute_correct_result_64 (&vals[i + 0], &vals[i + 4], imm, ck);
 
@@ -264,7 +259,6 @@ 
 	ssse3_test_palignr (&vals[i + 0], &vals[i + 4], imm, &r[0]);
 	ssse3_test_palignr (&vals[i + 2], &vals[i + 6], imm, &r[2]);
 	fail += chk_128 (ck, r);
-#endif
 
 	/* Recompute the results for 128-bits */
 	compute_correct_result_128 (&vals[i + 0], &vals[i + 4], imm, ck);
Index: gcc.target/i386/ssse3-phaddd.c
===================================================================
--- gcc.target/i386/ssse3-phaddd.c	(revision 268854)
+++ gcc.target/i386/ssse3-phaddd.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phaddd (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_hadd_pi32 (t1, t2);
   _mm_empty();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -64,12 +62,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phaddd (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phaddd (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phaddd128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-phaddsw.c
===================================================================
--- gcc.target/i386/ssse3-phaddsw.c	(revision 268854)
+++ gcc.target/i386/ssse3-phaddsw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phaddsw (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_hadds_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -78,12 +76,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phaddsw (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phaddsw (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phaddsw128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-phaddw.c
===================================================================
--- gcc.target/i386/ssse3-phaddw.c	(revision 268854)
+++ gcc.target/i386/ssse3-phaddw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phaddw (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_hadd_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -67,12 +65,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phaddw (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phaddw (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phaddw128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-phsubd.c
===================================================================
--- gcc.target/i386/ssse3-phsubd.c	(revision 268854)
+++ gcc.target/i386/ssse3-phsubd.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phsubd (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_hsub_pi32(t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -63,12 +61,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phsubd (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phsubd (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phsubd128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-phsubsw.c
===================================================================
--- gcc.target/i386/ssse3-phsubsw.c	(revision 268854)
+++ gcc.target/i386/ssse3-phsubsw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phsubsw (int *i1, int *i2, int *r)
@@ -28,7 +27,6 @@ 
 
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -81,12 +79,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_phsubsw (&vals[i + 0], &vals[i + 2], &r[0]);
       ssse3_test_phsubsw (&vals[i + 4], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_phsubsw128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-phsubw.c
===================================================================
--- gcc.target/i386/ssse3-phsubw.c	(revision 268854)
+++ gcc.target/i386/ssse3-phsubw.c	(working copy)
@@ -15,7 +15,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_phsubw (int *i1, int *i2, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_hsub_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -66,12 +64,10 @@ 
       /* 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);
Index: gcc.target/i386/ssse3-pmaddubsw.c
===================================================================
--- gcc.target/i386/ssse3-pmaddubsw.c	(revision 268854)
+++ gcc.target/i386/ssse3-pmaddubsw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pmaddubsw (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_maddubs_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -81,12 +79,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_pmaddubsw (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_pmaddubsw (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_pmaddubsw128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-pmulhrsw.c
===================================================================
--- gcc.target/i386/ssse3-pmulhrsw.c	(revision 268854)
+++ gcc.target/i386/ssse3-pmulhrsw.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pmulhrsw (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *) r = _mm_mulhrs_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -68,12 +66,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_pmulhrsw (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_pmulhrsw (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_pmulhrsw128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-pshufb.c
===================================================================
--- gcc.target/i386/ssse3-pshufb.c	(revision 268854)
+++ gcc.target/i386/ssse3-pshufb.c	(working copy)
@@ -16,7 +16,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_pshufb (int *i1, int *i2, int *r)
@@ -26,7 +25,6 @@ 
   *(__m64 *)r = _mm_shuffle_pi8 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -38,7 +36,6 @@ 
   *(__m128i *)r = _mm_shuffle_epi8 (t1, t2);
 }
 
-#ifndef __AVX__
 /* Routine to manually compute the results */
 static void
 compute_correct_result_64 (int *i1, int *i2, int *r)
@@ -60,7 +57,6 @@ 
 	bout[i] = b1[8 + (select & 0x7)];
     }
 }
-#endif
 
 static void
 compute_correct_result_128 (int *i1, int *i2, int *r)
@@ -91,7 +87,6 @@ 
 
   for (i = 0; i < 256; i += 8)
     {
-#ifndef __AVX__
       /* Manually compute the result */
       compute_correct_result_64 (&vals[i + 0], &vals[i + 4], ck);
 
@@ -99,7 +94,6 @@ 
       ssse3_test_pshufb (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_pshufb (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Recompute the result for 128-bits */
       compute_correct_result_128 (&vals[i + 0], &vals[i + 4], ck);
Index: gcc.target/i386/ssse3-psignb.c
===================================================================
--- gcc.target/i386/ssse3-psignb.c	(revision 268854)
+++ gcc.target/i386/ssse3-psignb.c	(working copy)
@@ -15,7 +15,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_psignb (int *i1, int *i2, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_sign_pi8 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -68,12 +66,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_psignb (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_psignb (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_psignb128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-psignd.c
===================================================================
--- gcc.target/i386/ssse3-psignd.c	(revision 268854)
+++ gcc.target/i386/ssse3-psignd.c	(working copy)
@@ -15,7 +15,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_psignd (int *i1, int *i2, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_sign_pi32 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -65,12 +63,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_psignd (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_psignd (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_psignd128 (&vals[i + 0], &vals[i + 4], r);
Index: gcc.target/i386/ssse3-psignw.c
===================================================================
--- gcc.target/i386/ssse3-psignw.c	(revision 268854)
+++ gcc.target/i386/ssse3-psignw.c	(working copy)
@@ -15,7 +15,6 @@ 
 
 #include <tmmintrin.h>
 
-#ifndef __AVX__
 /* Test the 64-bit form */
 static void
 ssse3_test_psignw (int *i1, int *i2, int *r)
@@ -25,7 +24,6 @@ 
   *(__m64 *) r = _mm_sign_pi16 (t1, t2);
   _mm_empty ();
 }
-#endif
 
 /* Test the 128-bit form */
 static void
@@ -68,12 +66,10 @@ 
       /* Manually compute the result */
       compute_correct_result (&vals[i + 0], &vals[i + 4], ck);
 
-#ifndef __AVX__
       /* Run the 64-bit tests */
       ssse3_test_psignw (&vals[i + 0], &vals[i + 4], &r[0]);
       ssse3_test_psignw (&vals[i + 2], &vals[i + 6], &r[2]);
       fail += chk_128 (ck, r);
-#endif
 
       /* Run the 128-bit tests */
       ssse3_test_psignw128 (&vals[i + 0], &vals[i + 4], r);