]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/17930 (-mfpmath=sse creates illegal code (movapd with misaligned...
authorRichard Henderson <rth@redhat.com>
Tue, 14 Dec 2004 01:30:35 +0000 (17:30 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 14 Dec 2004 01:30:35 +0000 (17:30 -0800)
        PR middle-end/17930
        * passes.c (rest_of_clean_state): Fix computation of
        preferred_incoming_stack_boundary.

From-SVN: r92116

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/gcc.dg/i386-sse-10.c [new file with mode: 0644]

index f3e5a577238b3cb5ce4c5fed6fbb2cb0aa223c0e..de26071771aaa79a68bc6335a26e80b4b8600f0f 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-13  Richard Henderson  <rth@redhat.com>
+
+       PR middle-end/17930
+        * passes.c (rest_of_clean_state): Fix computation of
+        preferred_incoming_stack_boundary.
+
 2004-12-13  Wolfgang Bangerth <bangerth@dealii.org>
 
        * reload.h: Remove struct needs and its only use.
index c2cd4e0d6c7fe3270e770268ff01560cf46468df..5e808e9230803ef6b86595ae108df958c6d6e31a 100644 (file)
@@ -1503,8 +1503,7 @@ rest_of_clean_state (void)
   if (targetm.binds_local_p (current_function_decl))
     {
       int pref = cfun->preferred_stack_boundary;
-      if (cfun->recursive_call_emit
-          && cfun->stack_alignment_needed > cfun->preferred_stack_boundary)
+      if (cfun->stack_alignment_needed > cfun->preferred_stack_boundary)
        pref = cfun->stack_alignment_needed;
       cgraph_rtl_info (current_function_decl)->preferred_incoming_stack_boundary
         = pref;
diff --git a/gcc/testsuite/gcc.dg/i386-sse-10.c b/gcc/testsuite/gcc.dg/i386-sse-10.c
new file mode 100644 (file)
index 0000000..ae557f3
--- /dev/null
@@ -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;
+}
This page took 0.09772 seconds and 5 git commands to generate.