[patch] Fix PR tree-optimization/45722
Richard Guenther
richard.guenther@gmail.com
Sun Nov 14 12:12:00 GMT 2010
On Sun, Nov 14, 2010 at 12:17 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this is the failure of gcc.c-torture/execute/20040709-2.c on various strict
> alignment platforms. The SRA pass builds naked MEM_REFs to scalarize direct
> assignments between structures and this can run afoul of the old quirks of
> the indirect access support on strict alignment platforms. So the attached
> patch arranges to always preserve existing COMPONENT_REF accesses around the
> MEM_REFs; I think a complete fix would be not to build the MEM_REFs in the
> first place as this introduces artificial addressability issues that aren't in
> the original code.
What kind of artificial addressability issues? Note that the base operand of
a MEM_REF does not have to be addressable.
> This in turn requires a small adjustment to the pattern
> matching code in ipa-prop.c.
>
> Tested on x86-64/Linux, SPARC 32-bit and 64-bit Solaris. OK for mainline?
Ok.
Thanks,
Richard.
>
> 2010-11-13 Eric Botcazou <ebotcazou@adacore.com>
>
> PR tree-optimization/45722
> * tree-sra.c (build_ref_for_model): Always build a COMPONENT_REF if
> this is a reference to a component.
> * ipa-prop.c (ipa_get_member_ptr_load_param): Accept COMPONENT_REF.
> (ipa_note_param_call): Adjust comment.
>
>
> --
> Eric Botcazou
>
More information about the Gcc-patches
mailing list