On Fri, Dec 5, 2014 at 8:13 AM, Martin Jambor <mjam...@suse.cz> wrote:
> Hi,
>
> at some point I lost an important division of bit offset by
> BITS_PER_UNIT in my alignment IPA-CP propagation patch. That lead to a
> few failures on i686 reported as PR 64192.
>
> This patch adds it together with a slight improvement of the guarding
> check which I suppose will never trigger but it does ensure the
> division will never loose information.
>
> I consider this change obvious and would really like to commit it
> before I leave for the weekend, so I will do so after it finishes
> bootstrapping and testing on i686.  It has already passed bootstrap
> and testing on x86_64-linux.
>
> Thanks,
>
> Martin
>
>
> 2014-12-05  Martin Jambor  <mjam...@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.
>
> Index: src/gcc/ipa-prop.c
> ===================================================================
> --- src.orig/gcc/ipa-prop.c
> +++ src/gcc/ipa-prop.c
> @@ -1739,10 +1739,11 @@ ipa_compute_jump_functions_for_edge (str
>           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

It also fixed SPEC CPU 2000 regression on Linux/i686.

Thanks.

-- 
H.J.

Reply via email to