]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2016-03-29 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Mar 2016 12:36:39 +0000 (12:36 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Mar 2016 12:36:39 +0000 (12:36 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234517 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c
gcc/ipa-prop.c

index 93a26185637838b3d0ca225fd59f9780aadba5e6..decdd7111fe72b3005f6260f5a2f79ca22a396ce 100644 (file)
@@ -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.
index 058ecc39aab205099713e503861103ce6ba5ee6d..9368ed0f5e3e761319d997dfaa8a5007feabae38 100644 (file)
@@ -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
        {
index d62c70405dbf65c16b1130f159d20452310eec1d..65482bad3662c046709db1c16329ceda70e6c55c 100644 (file)
@@ -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;