aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/i386-sse-10.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-12-13 17:30:35 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-12-13 17:30:35 -0800
commitb3f332c6b47788bc4b3ecffd2236f6b1333755bd (patch)
treecaa0a198e00cf31abb11cfb9a486833a34269f1b /gcc/testsuite/gcc.dg/i386-sse-10.c
parent648cdd5e967907edea5aa34fff07deb14f9a1ef9 (diff)
downloadgcc-b3f332c6b47788bc4b3ecffd2236f6b1333755bd.zip
gcc-b3f332c6b47788bc4b3ecffd2236f6b1333755bd.tar.gz
gcc-b3f332c6b47788bc4b3ecffd2236f6b1333755bd.tar.bz2
re PR middle-end/17930 (-mfpmath=sse creates illegal code (movapd with misaligned argument))
PR middle-end/17930 * passes.c (rest_of_clean_state): Fix computation of preferred_incoming_stack_boundary. From-SVN: r92116
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-sse-10.c')
-rw-r--r--gcc/testsuite/gcc.dg/i386-sse-10.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-sse-10.c b/gcc/testsuite/gcc.dg/i386-sse-10.c
new file mode 100644
index 0000000..ae557f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/i386-sse-10.c
@@ -0,0 +1,34 @@
+/* PR 17930 */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O1 -msse2 -mfpmode=sse -mno-accumulate-outgoing-args" } */
+
+#include "i386-cpuid.h"
+
+typedef _Complex double complex_16;
+
+void NOINLINE
+test (complex_16 a[5][5])
+{
+ int i, j, k;
+ complex_16 x;
+
+ for (j = 0; j < 5; j++)
+ for (i = 0; i < 5; i++)
+ {
+ for (k = 0; k < j - 1; ++k)
+ x = a[k][i] * ~a[k][j];
+ a[j][i] = x;
+ }
+}
+
+int main()
+{
+ static complex_16 work[5][5];
+ unsigned long cpu_facilities;
+
+ cpu_facilities = i386_cpuid ();
+ if (cpu_facilities & bit_SSE2)
+ test (work);
+
+ return 0;
+}