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
This commit is contained in:
Richard Henderson 2004-12-13 17:30:35 -08:00 committed by Richard Henderson
parent 648cdd5e96
commit b3f332c6b4
3 changed files with 41 additions and 2 deletions

View 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.

View 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;

View File

@ -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;
}