Patchwork PATCH: PR middle-end/45678: [4.4/4.5/4.6 Regression] crash on vector code with -m32 -msse

login
register
mail settings
Submitter Jakub Jelinek
Date Sept. 20, 2010, 8:24 p.m.
Message ID <20100920202439.GP1269@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/65250/
State New
Headers show

Comments

Jakub Jelinek - Sept. 20, 2010, 8:24 p.m.
On Mon, Sep 20, 2010 at 10:12:58AM -0700, H.J. Lu wrote:
> You should remove
> 
> update_stack_alignment (align);
> 
> a few line down since it will never increase stack alignment.

Here is an updated patch, bootstrapped/regtested again on x86_64-linux and
i686-linux.  Ok?

2010-09-20  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/45678
	* cfgexpand.c (expand_one_stack_var_at): Use
	crtl->max_used_stack_slot_alignment as max_align, instead
	of maximum of that and PREFERRED_STACK_BOUNDARY.
	Don't call update_stack_alignment.



	Jakub
Richard Henderson - Sept. 20, 2010, 8:31 p.m.
On 09/20/2010 01:24 PM, Jakub Jelinek wrote:
> 	PR middle-end/45678
> 	* cfgexpand.c (expand_one_stack_var_at): Use
> 	crtl->max_used_stack_slot_alignment as max_align, instead
> 	of maximum of that and PREFERRED_STACK_BOUNDARY.
> 	Don't call update_stack_alignment.

OK.


r~

Patch

--- gcc/cfgexpand.c.jj	2010-09-20 18:44:57.928431137 +0200
+++ gcc/cfgexpand.c	2010-09-20 20:03:32.706364386 +0200
@@ -738,12 +738,10 @@  expand_one_stack_var_at (tree decl, HOST
       offset -= frame_phase;
       align = offset & -offset;
       align *= BITS_PER_UNIT;
-      max_align = MAX (crtl->max_used_stack_slot_alignment,
-		       PREFERRED_STACK_BOUNDARY);
+      max_align = crtl->max_used_stack_slot_alignment;
       if (align == 0 || align > max_align)
 	align = max_align;
 
-      update_stack_alignment (align);
       DECL_ALIGN (decl) = align;
       DECL_USER_ALIGN (decl) = 0;
     }