This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [pr 69666] No SRA default_def replacements for unscalarizable
- From: Martin Jambor <mjambor at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Feb 2016 17:23:40 +0100
- Subject: Re: [pr 69666] No SRA default_def replacements for unscalarizable
- Authentication-results: sourceware.org; auth=none
- References: <20160219162156 dot GA16767 at virgil dot suse dot cz> <CAMe9rOrWu0s2onB-N78fSsL1+xtnrh3Vaezjx6smrc3Tde5EHQ at mail dot gmail dot com>
On Tue, Feb 23, 2016 at 06:45:08AM -0800, H.J. Lu wrote:
> On Fri, Feb 19, 2016 at 8:21 AM, Martin Jambor <mjambor@suse.cz> wrote:
> > Hi,
> >
> > in PR 69666, SRA attempts to turn a load from an aggregate that is
> > uninitialized into a load from a default definition SSA name (which
> > something it does to generate an appropriate warning later) but
> > unfortunately it does so using an access structure which is
> > representable with __int128 when the load in question is smaller. It
> > then attempts to fix it up only to create an invalid V_C_E. In this
> > case, the correct thing to do is not to attempt the transformation,
> > when there are smaller accesses, which can be figured out by looking
> > at the unscalarizable_region flag of the access.
> >
> > Bootstrapped and tested on x86_64, OK for trunk and later for the 5
> > branch?
> >
>
> This may have caused:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69920
>
I have reverted the patch on the gcc-5 branch as Jakub asked me to. I
do have a fix for the issue but I'd like to investigate one aspect of
this problem a bit more tomorrow (see below) before testing it and
formally proposing it here.
Sorry for the breakage,
Martin
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3504,7 +3504,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
else
{
if (access_has_children_p (racc)
- && !racc->grp_unscalarized_data)
+ && !racc->grp_unscalarized_data
+ && TREE_CODE (lhs) != SSA_NAME)
{
if (dump_file)
{