Martin Jambor wrote: > I had to add a test that the analyzed expression is not an SSA name. > This has been approved by Rchi on IRC yesterday. Thus, I have > committed the following as revision 175703 after successful run of c > and c++ testsuite on sparc64 (and a bootstrap and test with another > patch on x86_64-linux). > > Thanks, > > Martin > > > 2011-06-30 Martin Jambor <mjam...@suse.cz> > > PR tree-optimization/49094 > * tree-sra.c (tree_non_mode_aligned_mem_p): New function. > (build_accesses_from_assign): Use it.
This causes a regression on spu-elf: FAIL: gcc.dg/tree-ssa/forwprop-5.c scan-tree-dump-times optimized "disappear" 0 The problem is that in this expression disappear = VIEW_CONVERT_EXPR<struct VecClass>(x_8); the rhs is considered unaligned and blocks the SRA transformation. The check you added for SSA_NAMEs doesn't hit, because the SSA_NAME is encapsulated in a VIEW_CONVERT_EXPR. When get_object_alignment is called, the VIEW_CONVERT_EXPR is stripped off by get_inner_reference and the SSA_NAME appears, but then get_object_alignment doesn't handle it and just returns the default alignment of 8 bits. Maybe get_object_alignment should itself handle SSA_NAMEs? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com