public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <andrew_stubbs@mentor.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: DSE and maskstore trouble
Date: Tue, 03 Jul 2018 11:57:00 -0000	[thread overview]
Message-ID: <8d7bcb72-7b5c-3525-6fdf-63591bb7839c@mentor.com> (raw)
In-Reply-To: <CAFiYyc35N6goNoaM+U-Vzf3=vSzv0fY+sgykpH2YXnTmZaTG7Q@mail.gmail.com>

On 03/07/18 12:45, Richard Biener wrote:
> On Tue, Jul 3, 2018 at 1:38 PM Andrew Stubbs <andrew_stubbs@mentor.com> wrote:
>>
>> On 03/07/18 12:30, Richard Biener wrote:
>>>> Hmm, so they're safe, but may prevent the optimization of nearby variables?
>>>
>>> Yes, they prevent earlier stores into lanes that are "really" written
>>> to to be DSEd.
>>
>> Right, but I have unrelated variables allocated to the stack within the
>> "shadow" of the masked vector. I didn't ask it to do that, it just does,
>> so I presume this is an expect feature of masked vectors with a known mask.
> 
> Huh, I don't think so.  I guess that's the real error and I wonder how
> that happens.
> Are those just spills or real allocations?

The code from the testcase looks like this:

     struct rtattr rt[2];
     struct rtattr *rta[14];
     int i;

     rt[0].rta_len = sizeof (struct rtattr) + 8;
     rt[0].rta_type = 0;
     rt[1] = rt[0];
     for (i = 0; i < 14; i++)
       rta[i] = &rt[0];

The initialization of rt[0] and rt[1] are being deleted because the 
write to rta[0..13] would overwrite rt if it had actually been the 
maximum rta[0..63].

That, or I've been staring at dumps too long and gone crazy.

Andrew

P.S. I'm trying to test with (match_dup 0), but LRA exploded.

  reply	other threads:[~2018-07-03 11:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03  9:59 Andrew Stubbs
2018-07-03 10:16 ` Richard Biener
2018-07-03 10:33   ` Andrew Stubbs
2018-07-03 10:57     ` Andrew Stubbs
2018-07-03 11:02       ` Richard Biener
2018-07-03 11:06         ` Andrew Stubbs
2018-07-03 11:31           ` Richard Biener
2018-07-03 11:38             ` Andrew Stubbs
2018-07-03 11:46               ` Richard Biener
2018-07-03 11:57                 ` Andrew Stubbs [this message]
2018-07-03 12:21                   ` Richard Biener
2018-07-03 12:46                     ` Andrew Stubbs
2018-07-03 13:52                       ` Richard Biener
2018-07-03 15:19                         ` Andrew Stubbs
2018-07-03 16:45                           ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d7bcb72-7b5c-3525-6fdf-63591bb7839c@mentor.com \
    --to=andrew_stubbs@mentor.com \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).