On Wed, Sep 28, 2011 at 11:34 AM, Tom de Vries <tom_devr...@mentor.com> wrote: > Richard, > > I got a patch for PR50527. > > The patch prevents the alignment of vla-related allocas to be set to > BIGGEST_ALIGNMENT in ccp. The alignment may turn out smaller after folding > the alloca. > > Bootstrapped and regtested on x86_64. > > OK for trunk?
Hmm. As gfortran with -fstack-arrays uses VLAs it's probably bad that the vectorizer then will no longer see that the arrays are properly aligned. I'm not sure what the best thing to do is here, other than trying to record the alignment requirement of the VLA somewhere. Forcing the alignment of the alloca replacement decl to BIGGEST_ALIGNMENT has the issue that it will force stack-realignment which isn't free (and the point was to make the decl cheaper than the alloca). But that might possibly be the better choice. Any other thoughts? Thanks, Richard. > Thanks, > - Tom > > 2011-09-27 Tom de Vries <t...@codesourcery.com> > > * tree-ssa-ccp.c (evaluate_stmt): Don't assume alignment for > vla-related > allocas. > > * gcc.dg/pr50527.c: New test. >