[Bug tree-optimization/52571] vectorizer changes alignment of common symbols

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 10 11:45:00 GMT 2012


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

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-10 11:28:28 UTC ---
(In reply to comment #11)
> Ah, I had another thought.  COMDAT and LINKONCE things I don't think can be
> realigned for all the same reasons that one cannot align COMMON.  I've not
> thought about this long and hard, so, could be wrong, so, would be good to have
> a C++ or a vectorizer person review the idea.  The idea is, if you compile one
> translation unit with a vectorizor on, and another with it off, we wind up with
> two instantiations, each with different alignment, and the one picked at the
> end need not be either of them, but rather an explicit instantiation.   This
> seems identical to what happens to common to me.

The question is what the specification says the link editor needs to do
here.  IMHO it needs to pick the version with the biggest alignment
(what happens if you have two same comdat groups with different comdats
having their alignment bumped?)

This all asks for LTO to regularize symbols more aggressively, thus get
rid of DECL_COMMONs and of COMDAT/LINKONCE, too.



More information about the Gcc-bugs mailing list