summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/ssse3-psignd.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
index 8b1ab4d880a..eca0489f8d3 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
@@ -2,11 +2,20 @@
/* { dg-require-effective-target ssse3 } */
/* { 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_psignd (int *i1, int *i2, int *r)
@@ -16,6 +25,7 @@ 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
@@ -43,7 +53,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)));
@@ -55,10 +65,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_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);