This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/51315] [4.6/4.7 regression] unaligned memory accesses generated with -ftree-sra


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51315

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 14:16:21 UTC ---
Note that in the end it's always us transforming

 a->b.c

to (effectively)

 T *tem = &a->b.c;
 *tem

which expand unfortunately handles differently.  So whenever we do that
we have to either avoid doing that if expand would have a different
idea about the results alignment (there is currently no way that computes
just expands idea of an expressions alignment - one piece of a good
solution would provide that, not only SRA has this "issue"), or, stick
that information somewhere (on the TREE_TYPE of the MEM_REF tree, but
then it will only be honoured if the target provides a movmisalign
optab - the other piece of a good solution would be that expand _always_
honors such alignment information and goes the same way as when expanding
component refs).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]