On Thu, Feb 14, 2019 at 1:30 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > Since we now emulate MMX intrinsics with SSE in 64-bit mode, we can > enable SSSE3 __m64 tests even when AVX is enabled. > > PR target/89021 > * gcc.target/i386/ssse3-pabsb.c: Also enable __m64 check in > 64-bit mode. > * gcc.target/i386/ssse3-pabsd.c: Likewise. > * gcc.target/i386/ssse3-pabsw.c: Likewise. > * gcc.target/i386/ssse3-palignr.c: Likewise. > * gcc.target/i386/ssse3-phaddd.c: Likewise. > * gcc.target/i386/ssse3-phaddsw.c: Likewise. > * gcc.target/i386/ssse3-phaddw.c: Likewise. > * gcc.target/i386/ssse3-phsubd.c: Likewise. > * gcc.target/i386/ssse3-phsubsw.c: Likewise. > * gcc.target/i386/ssse3-phsubw.c: Likewise. > * gcc.target/i386/ssse3-pmaddubsw.c: Likewise. > * gcc.target/i386/ssse3-pmulhrsw.c: Likewise. > * gcc.target/i386/ssse3-pshufb.c: Likewise. > * gcc.target/i386/ssse3-psignb.c: Likewise. > * gcc.target/i386/ssse3-psignd.c: Likewise. > * gcc.target/i386/ssse3-psignw.c: Likewise. > --- > gcc/testsuite/gcc.target/i386/ssse3-pabsb.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-pabsd.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-pabsw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-palignr.c | 6 +++--- > gcc/testsuite/gcc.target/i386/ssse3-phaddd.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-phaddw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-phsubd.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-phsubw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-pshufb.c | 6 +++--- > gcc/testsuite/gcc.target/i386/ssse3-psignb.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-psignd.c | 4 ++-- > gcc/testsuite/gcc.target/i386/ssse3-psignw.c | 4 ++-- > 16 files changed, 34 insertions(+), 34 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c > b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c > index 7caa1b6c3a6..eef4ccae222 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c > @@ -15,7 +15,7 @@ > #include "ssse3-vals.h" > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__
Better add || defined __x86_64__. I also wonder why AVX has to be disabled here. MMX should be orthogonal to AVX. Uros. > /* Test the 64-bit form */ > static void > ssse3_test_pabsb (int *i1, int *r) > @@ -63,7 +63,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result(&vals[i + 0], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Run the 64-bit tests */ > ssse3_test_pabsb (&vals[i + 0], &r[0]); > ssse3_test_pabsb (&vals[i + 2], &r[2]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c > b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c > index 3a73cf01170..60043bad4a4 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_pabsd (int *i1, int *r) > @@ -62,7 +62,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result(&vals[i + 0], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Run the 64-bit tests */ > ssse3_test_pabsd (&vals[i + 0], &r[0]); > ssse3_test_pabsd (&vals[i + 2], &r[2]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c > b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c > index 67e4721b8e6..dd0caa9783f 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_pabsw (int *i1, int *r) > @@ -64,7 +64,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Run the 64-bit tests */ > ssse3_test_pabsw (&vals[i + 0], &r[0]); > ssse3_test_pabsw (&vals[i + 2], &r[2]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c > b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c > index dbee9bee4aa..f266f7805b8 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c > @@ -17,7 +17,7 @@ > #include <tmmintrin.h> > #include <string.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_palignr (int *i1, int *i2, unsigned int imm, int *r) > @@ -214,7 +214,7 @@ compute_correct_result_128 (int *i1, int *i2, unsigned > int imm, int *r) > bout[i] = buf[imm + i]; > } > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > static void > compute_correct_result_64 (int *i1, int *i2, unsigned int imm, int *r) > { > @@ -256,7 +256,7 @@ TEST (void) > for (i = 0; i < 256; i += 8) > for (imm = 0; imm < 100; imm++) > { > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Manually compute the result */ > compute_correct_result_64 (&vals[i + 0], &vals[i + 4], imm, ck); > > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c > b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c > index bef78168659..1bb9006230a 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phaddd (int *i1, int *i2, int *r) > @@ -64,7 +64,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c > b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c > index ff31fe5a5fe..d93bb452347 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phaddsw (int *i1, int *i2, int *r) > @@ -78,7 +78,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c > b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c > index 05c0afd4f69..5f0524e6c55 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phaddw (int *i1, int *i2, int *r) > @@ -67,7 +67,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c > b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c > index 5884e5c12fe..d3bc13df15b 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phsubd (int *i1, int *i2, int *r) > @@ -63,7 +63,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c > b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c > index 371c8d112d1..6024c04e0ce 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phsubsw (int *i1, int *i2, int *r) > @@ -81,7 +81,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c > b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c > index f3dbf9c9896..ab7486628bf 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c > @@ -15,7 +15,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_phsubw (int *i1, int *i2, int *r) > @@ -66,7 +66,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c > b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c > index 00bfc844f42..c3e97a1f4eb 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_pmaddubsw (int *i1, int *i2, int *r) > @@ -81,7 +81,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c > b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c > index 24570b3bd63..be4e7eb406a 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_pmulhrsw (int *i1, int *i2, int *r) > @@ -68,7 +68,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c > b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c > index b995456b61c..67db8dcec7e 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c > @@ -16,7 +16,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_pshufb (int *i1, int *i2, int *r) > @@ -38,7 +38,7 @@ ssse3_test_pshufb128 (int *i1, int *i2, int *r) > *(__m128i *)r = _mm_shuffle_epi8 (t1, t2); > } > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Routine to manually compute the results */ > static void > compute_correct_result_64 (int *i1, int *i2, int *r) > @@ -91,7 +91,7 @@ TEST (void) > > for (i = 0; i < 256; i += 8) > { > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Manually compute the result */ > compute_correct_result_64 (&vals[i + 0], &vals[i + 4], ck); > > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c > b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c > index 7462929aa20..2b676f4699d 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c > @@ -15,7 +15,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_psignb (int *i1, int *i2, int *r) > @@ -68,7 +68,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c > b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c > index eca0489f8d3..0998f232eb8 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c > @@ -15,7 +15,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_psignd (int *i1, int *i2, int *r) > @@ -65,7 +65,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c > b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c > index 00a506fd894..f8dc776a8ba 100644 > --- a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c > +++ b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c > @@ -15,7 +15,7 @@ > > #include <tmmintrin.h> > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* Test the 64-bit form */ > static void > ssse3_test_psignw (int *i1, int *i2, int *r) > @@ -68,7 +68,7 @@ TEST (void) > /* Manually compute the result */ > compute_correct_result (&vals[i + 0], &vals[i + 4], ck); > > -#ifndef __AVX__ > +#if !defined __AVX__ || defined __x86_64__ > /* 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]); > -- > 2.20.1 >