summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-02 14:05:21 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-02 14:05:21 +0000
commit31d31e071b4a461e26a2dba1356dad40f5a23bbf (patch)
tree215bc42509d8654673447e88532ee1fb0a10bcf3 /gcc/loop-invariant.c
parent270d01177985c10fd1c6e05988a6e139b7d203ec (diff)
downloadgcc-31d31e071b4a461e26a2dba1356dad40f5a23bbf.tar.gz
decl alignment not respected
This patch cures a problem with ICF of read-only variables at the intersection of -fsection-anchors, -ftree-loop-vectorize, and targets with alignment restrictions. What happens with the testcase is: - "c" is referenced in a constructor, thus make_decl_rtl for "c", - make_decl_rtl puts "c" in an anchor block (-fsection-anchors), - anchor block contents can't move, so "c" alignment can't change by ipa_increase_alignment (-ftree-loop-vectorize), - however "a" alignment can be increased, - ICF aliases "a" to "c". So we have a decl for "a" saying it is aligned to 128 bits, using mem for "c" which is only 16 bit aligned. PR ipa/69990 gcc/ * ipa-icf.c (sem_variable::merge): Do not merge an alias with larger alignment. gcc/testsuite/ gcc.dg/pr69990.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233906 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
0 files changed, 0 insertions, 0 deletions