* 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.
From-SVN: r268907
+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.
+
2018-02-14 Steve Ellcey <sellcey@marvell.com>
* gcc.target/aarch64/pcs_attribute.c: New test.
#include "ssse3-vals.h"
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pabsb (int *i1, int *r)
*(__m64 *) r = _mm_abs_pi8 (t1);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pabsd (int *i1, int *r)
*(__m64 *) r = _mm_abs_pi32 (t1);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pabsw (int *i1, int *r)
*(__m64 *) r = _mm_abs_pi16 (t1);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#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)
_mm_empty();
}
-#endif
/* Test the 128-bit form */
static void
bout[i] = buf[imm + i];
}
-#ifndef __AVX__
static void
compute_correct_result_64 (int *i1, int *i2, unsigned int imm, int *r)
{
else
bout[i + 8] = buf[imm + i];
}
-#endif
static void
TEST (void)
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);
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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_phaddd (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_hadd_pi32 (t1, t2);
_mm_empty();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_phaddsw (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_hadds_pi16 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_phaddw (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_hadd_pi16 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_phsubd (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_hsub_pi32(t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_phsubsw (int *i1, int *i2, int *r)
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
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
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pmaddubsw (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_maddubs_pi16 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pmulhrsw (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_mulhrs_pi16 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_pshufb (int *i1, int *i2, int *r)
*(__m64 *)r = _mm_shuffle_pi8 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
*(__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)
bout[i] = b1[8 + (select & 0x7)];
}
}
-#endif
static void
compute_correct_result_128 (int *i1, int *i2, int *r)
for (i = 0; i < 256; i += 8)
{
-#ifndef __AVX__
/* Manually compute the result */
compute_correct_result_64 (&vals[i + 0], &vals[i + 4], ck);
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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_psignb (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_sign_pi8 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_psignd (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_sign_pi32 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);
#include <tmmintrin.h>
-#ifndef __AVX__
/* Test the 64-bit form */
static void
ssse3_test_psignw (int *i1, int *i2, int *r)
*(__m64 *) r = _mm_sign_pi16 (t1, t2);
_mm_empty ();
}
-#endif
/* Test the 128-bit form */
static void
/* 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);