+2007-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sse3-addsubpd.c: Don't include stdlib.h
+ nor i386-cpuid.h. Include sse3-check.h. Remove main ().
+ * gcc.target/i386/sse3-addsubps.c: Likewise.
+ * gcc.target/i386/sse3-haddpd.c: Likewise.
+ * gcc.target/i386/sse3-haddps.c: Likewise.
+ * gcc.target/i386/sse3-hsubpd.c: Likewise.
+ * gcc.target/i386/sse3-hsubps.c: Likewise.
+ * gcc.target/i386/sse3-lddqu.c: Likewise.
+ * gcc.target/i386/sse3-movddup.c: Likewise.
+ * gcc.target/i386/sse3-movshdup.c: Likewise.
+ * gcc.target/i386/sse3-movsldup.c: Likewise.
+
+ * gcc.target/i386/ssse3-pabsb.c: Don't include stdlib.h
+ nor i386-cpuid.h. Include ssse3-check.h. Remove main ().
+ * 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.target/i386/ssse3-vals.h: Likewise.
+
+ * gcc.target/i386/sse3-check.h: New file.
+ * gcc.target/i386/ssse3-check.h: Likewise.
+
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_addsubpd (double *i1, double *i2, double *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_addsubps (float *i1, float *i2, float *r)
--- /dev/null
+#include <stdlib.h>
+
+#include "../../gcc.dg/i386-cpuid.h"
+
+static void sse3_test (void);
+
+int
+main ()
+{
+ unsigned long cpu_facilities;
+
+ cpu_facilities = i386_cpuid_ecx ();
+
+ /* Run SSE3 test only if host has SSE3 support. */
+ if ((cpu_facilities & bit_SSE3))
+ sse3_test ();
+
+ exit (0);
+}
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_haddpd (double *i1, double *i2, double *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_haddps (float *i1, float *i2, float *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_hsubpd (double *i1, double *i2, double *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_hsubps (float *i1, float *i2, float *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_lddqu (double *i1, double *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movddup_mem (double *i1, double *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movshdup_reg (float *i1, float *r)
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movsldup_reg (float *i1, float *r)
--- /dev/null
+#include <stdlib.h>
+
+#include "../../gcc.dg/i386-cpuid.h"
+
+static void ssse3_test (void);
+
+int
+main ()
+{
+ unsigned long cpu_facilities;
+
+ cpu_facilities = i386_cpuid_ecx ();
+
+ /* Run SSSE3 test only if host has SSSE3 support. */
+ if ((cpu_facilities & bit_SSSE3))
+ ssse3_test ();
+
+ exit (0);
+}
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <string.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
+#include <string.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void