diff options
author | Richard Biener <rguenther@suse.de> | 2016-03-29 12:36:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-03-29 12:36:39 +0000 |
commit | 5f9a167b52b3ab1ce20108c146f136ddf7dbffc9 (patch) | |
tree | 7950d001cca3632b564da9bb357095316e9115b2 /gcc | |
parent | dc2e89953683df032f15d65845eb2d287f646423 (diff) | |
download | gcc-5f9a167b52b3ab1ce20108c146f136ddf7dbffc9.zip gcc-5f9a167b52b3ab1ce20108c146f136ddf7dbffc9.tar.gz gcc-5f9a167b52b3ab1ce20108c146f136ddf7dbffc9.tar.bz2 |
re PR middle-end/70424 (Pointer derived from integer gets reduced alignment)
2016-03-29 Richard Biener <rguenther@suse.de>
PR middle-end/70424
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Always
use alignment returned by get_pointer_alignment_1 if it is
bigger than BITS_PER_UNIT.
* builtins.c (get_pointer_alignment_1): Do not return true
for alignment extracted from SSA info.
From-SVN: r234517
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/builtins.c | 2 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93a2618..decdd71 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2016-03-29 Richard Biener <rguenther@suse.de> + + PR middle-end/70424 + * ipa-prop.c (ipa_compute_jump_functions_for_edge): Always + use alignment returned by get_pointer_alignment_1 if it is + bigger than BITS_PER_UNIT. + * builtins.c (get_pointer_alignment_1): Do not return true + for alignment extracted from SSA info. + 2016-03-28 James Bowman <james.bowman@ftdichip.com> * config/ft32/ft32.opt (mnodiv): New. diff --git a/gcc/builtins.c b/gcc/builtins.c index 058ecc3..9368ed0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -463,7 +463,7 @@ get_pointer_alignment_1 (tree exp, unsigned int *alignp, if (*alignp == 0) *alignp = 1u << (HOST_BITS_PER_INT - 1); /* We cannot really tell whether this result is an approximation. */ - return true; + return false; } else { diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index d62c704..65482ba 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1639,11 +1639,11 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi, unsigned HOST_WIDE_INT hwi_bitpos; unsigned align; - if (get_pointer_alignment_1 (arg, &align, &hwi_bitpos) + get_pointer_alignment_1 (arg, &align, &hwi_bitpos); + if (align > BITS_PER_UNIT && align % BITS_PER_UNIT == 0 && hwi_bitpos % BITS_PER_UNIT == 0) { - gcc_checking_assert (align != 0); jfunc->alignment.known = true; jfunc->alignment.align = align / BITS_PER_UNIT; jfunc->alignment.misalign = hwi_bitpos / BITS_PER_UNIT; |