https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65355
Bug ID: 65355 Summary: [4.8/4.9 Regression] vectorizer increase alignment of symbols already placed in anchors Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org Increasing alignment of symbol does not work once RTL containing anchor was produced. Index: symtab.c =================================================================== --- symtab.c (revision 221268) +++ symtab.c (working copy) @@ -1924,6 +1924,13 @@ symtab_node::can_increase_alignment_p (v if (TREE_ASM_WRITTEN (target->decl)) return false; + /* If target is already placed in an anchor, we can not touch its + alignment. */ + if (DECL_RTL_SET_P (target->decl) + && MEM_P (DECL_RTL (target->decl)) + && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (DECL_RTL (target->decl), 0))) + return false; + /* Constant pool entries may be shared. */ if (DECL_IN_CONSTANT_POOL (target->decl)) return false; sadly introduce quite few testsuite regressions for ppc-linux (checking that alignmnet was increased). This is because notice_global_symbol produces RTL early and thus blocks this. I suppose notice_global_symbol needs to be redone to work on tree only. For next stage1 we also probably want to drop the increase_alignmnets IPA pass and run all late tree passes prior RTL generation.