re PR ipa/64192 (r218369 causes some regressions with -m32.)
authorMartin Jambor <mjambor@suse.cz>
Fri, 5 Dec 2014 18:14:37 +0000 (19:14 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 5 Dec 2014 18:14:37 +0000 (19:14 +0100)
2014-12-05  Martin Jambor  <mjambor@suse.cz>

PR ipa/64192
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Convert alignment
from bits to bytes after checking they are byte-aligned.

From-SVN: r218433

gcc/ChangeLog
gcc/ipa-prop.c

index 2995e5121b7c50ca4188d55f5c00149906057a92..9dbd2125b06c5ae56bc50e24245295fd0db59071 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-05  Martin Jambor  <mjambor@suse.cz>
+
+       PR ipa/64192
+       * ipa-prop.c (ipa_compute_jump_functions_for_edge): Convert alignment
+       from bits to bytes after checking they are byte-aligned.
+
 2014-12-05  Renlin Li  <renlin.li@arm.com>
 
        * config/aarch64/aarch64-opts.h (AARCH64_CORE): Rename IDENT to SCHED.
index eb83ae00baa4421833b15877bc027b219429dcee..9fab47df2617dab2404b4f7f759df0a33582e8fe 100644 (file)
@@ -1739,10 +1739,11 @@ ipa_compute_jump_functions_for_edge (struct func_body_info *fbi,
          unsigned align;
 
          if (get_pointer_alignment_1 (arg, &align, &hwi_bitpos)
-             && align > BITS_PER_UNIT)
+             && align % BITS_PER_UNIT == 0
+             && hwi_bitpos % BITS_PER_UNIT == 0)
            {
              jfunc->alignment.known = true;
-             jfunc->alignment.align = align;
+             jfunc->alignment.align = align / BITS_PER_UNIT;
              jfunc->alignment.misalign = hwi_bitpos / BITS_PER_UNIT;
            }
          else