aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-03-03 00:35:21 +1030
committerAlan Modra <amodra@gcc.gnu.org>2016-03-03 00:35:21 +1030
commit90a7a40b65d1057bff07961dd9c8b0c05c345ba8 (patch)
tree215bc42509d8654673447e88532ee1fb0a10bcf3 /gcc/loop-invariant.c
parentde752fb0d2d3e27407ea5735604577d5aa76bcac (diff)
downloadgcc-90a7a40b65d1057bff07961dd9c8b0c05c345ba8.zip
gcc-90a7a40b65d1057bff07961dd9c8b0c05c345ba8.tar.gz
gcc-90a7a40b65d1057bff07961dd9c8b0c05c345ba8.tar.bz2
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. From-SVN: r233906
Diffstat (limited to 'gcc/loop-invariant.c')
0 files changed, 0 insertions, 0 deletions