public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Recent change breaking Wrestrict8 on various targets
@ 2021-04-27 20:22 Jeff Law
  2021-04-28  7:10 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2021-04-27 20:22 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

This change:

d8e1f1d24179690fd9c0f63c27b12e030010d9ea is the first bad commit
commit d8e1f1d24179690fd9c0f63c27b12e030010d9ea
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Apr 7 12:09:44 2021 +0200

     tree-optimization/99912 - schedule DSE before SRA

     For the testcase in the PR the main SRA pass is unable to do some
     important scalarizations because dead stores of addresses make
     the candiate variables disqualified.  The following patch adds
     another DSE pass before SRA forming a DCE/DSE pair and moves the
     DSE pass that is currently closely after SRA up to after the
     next DCE pass, forming another DCE/DSE pair now residing after PRE.

     2021-04-07  Richard Biener  <rguenther@suse.de>

             PR tree-optimization/99912
             * passes.def (pass_all_optimizations): Add pass_dse before
             the first pass_dce, move the first pass_dse before the
             pass_dce following pass_pre.

             * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM.
             * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned.
             * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise.
             * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise.

Is breaking gcc.dg/Wrestrict-8.c on various targets (bfin-elf, lm32-elf, 
nds32le-elf, or1k-elf rx-elf).  I haven't dug into it all except for 
quickly bisecting.

http://3.14.90.209:8080/job/bfin-elf/


If you want the full logs...


Jeff


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recent change breaking Wrestrict8 on various targets
  2021-04-27 20:22 Recent change breaking Wrestrict8 on various targets Jeff Law
@ 2021-04-28  7:10 ` Richard Biener
  2021-04-28 12:46   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-04-28  7:10 UTC (permalink / raw)
  To: Jeff Law; +Cc: GCC Patches

On Tue, Apr 27, 2021 at 10:22 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
> This change:
>
> d8e1f1d24179690fd9c0f63c27b12e030010d9ea is the first bad commit
> commit d8e1f1d24179690fd9c0f63c27b12e030010d9ea
> Author: Richard Biener <rguenther@suse.de>
> Date:   Wed Apr 7 12:09:44 2021 +0200
>
>      tree-optimization/99912 - schedule DSE before SRA
>
>      For the testcase in the PR the main SRA pass is unable to do some
>      important scalarizations because dead stores of addresses make
>      the candiate variables disqualified.  The following patch adds
>      another DSE pass before SRA forming a DCE/DSE pair and moves the
>      DSE pass that is currently closely after SRA up to after the
>      next DCE pass, forming another DCE/DSE pair now residing after PRE.
>
>      2021-04-07  Richard Biener  <rguenther@suse.de>
>
>              PR tree-optimization/99912
>              * passes.def (pass_all_optimizations): Add pass_dse before
>              the first pass_dce, move the first pass_dse before the
>              pass_dce following pass_pre.
>
>              * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM.
>              * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned.
>              * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise.
>              * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise.
>
> Is breaking gcc.dg/Wrestrict-8.c on various targets (bfin-elf, lm32-elf,
> nds32le-elf, or1k-elf rx-elf).  I haven't dug into it all except for
> quickly bisecting.
>
> http://3.14.90.209:8080/job/bfin-elf/
>
>
> If you want the full logs...

With a followup patch I see FAILs on x86_64-linux as well.  The issue is
the testcase does things like

  T (&a8_1[0], &a8_1[i], 5);    /* { dg-warning "accessing 5 bytes at
offsets 0 and \\\[0, 8] overlaps between 2 and 5 bytes at offset
\\\[0, 3\\\]" } */
  T (&a8_1[0], &a8_1[i], 6);    /* { dg-warning "accessing 6 bytes at
offsets 0 and \\\[0, 8] overlaps between 4 and 6 bytes at offset
\\\[0, 2\\\]" } */

where T == memcpy.  The first memcpy is dead and we can eliminate it
(but only when an intermediate memcpy lowered to load/store is there).

I'm changing the testcase to alias T to memcpy (..); foo (..); to place an
artificial use of the destination memory after the memcpy.

Richard.

>
> Jeff
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recent change breaking Wrestrict8 on various targets
  2021-04-28  7:10 ` Richard Biener
@ 2021-04-28 12:46   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2021-04-28 12:46 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches


On 4/28/2021 1:10 AM, Richard Biener wrote:
> On Tue, Apr 27, 2021 at 10:22 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>> This change:
>>
>> d8e1f1d24179690fd9c0f63c27b12e030010d9ea is the first bad commit
>> commit d8e1f1d24179690fd9c0f63c27b12e030010d9ea
>> Author: Richard Biener <rguenther@suse.de>
>> Date:   Wed Apr 7 12:09:44 2021 +0200
>>
>>       tree-optimization/99912 - schedule DSE before SRA
>>
>>       For the testcase in the PR the main SRA pass is unable to do some
>>       important scalarizations because dead stores of addresses make
>>       the candiate variables disqualified.  The following patch adds
>>       another DSE pass before SRA forming a DCE/DSE pair and moves the
>>       DSE pass that is currently closely after SRA up to after the
>>       next DCE pass, forming another DCE/DSE pair now residing after PRE.
>>
>>       2021-04-07  Richard Biener  <rguenther@suse.de>
>>
>>               PR tree-optimization/99912
>>               * passes.def (pass_all_optimizations): Add pass_dse before
>>               the first pass_dce, move the first pass_dse before the
>>               pass_dce following pass_pre.
>>
>>               * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM.
>>               * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned.
>>               * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise.
>>               * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise.
>>
>> Is breaking gcc.dg/Wrestrict-8.c on various targets (bfin-elf, lm32-elf,
>> nds32le-elf, or1k-elf rx-elf).  I haven't dug into it all except for
>> quickly bisecting.
>>
>> http://3.14.90.209:8080/job/bfin-elf/
>>
>>
>> If you want the full logs...
> With a followup patch I see FAILs on x86_64-linux as well.  The issue is
> the testcase does things like
>
>    T (&a8_1[0], &a8_1[i], 5);    /* { dg-warning "accessing 5 bytes at
> offsets 0 and \\\[0, 8] overlaps between 2 and 5 bytes at offset
> \\\[0, 3\\\]" } */
>    T (&a8_1[0], &a8_1[i], 6);    /* { dg-warning "accessing 6 bytes at
> offsets 0 and \\\[0, 8] overlaps between 4 and 6 bytes at offset
> \\\[0, 2\\\]" } */
>
> where T == memcpy.  The first memcpy is dead and we can eliminate it
> (but only when an intermediate memcpy lowered to load/store is there).
>
> I'm changing the testcase to alias T to memcpy (..); foo (..); to place an
> artificial use of the destination memory after the memcpy.

Makes perfect sense.  Thanks for digging into it.

Jeff



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-28 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 20:22 Recent change breaking Wrestrict8 on various targets Jeff Law
2021-04-28  7:10 ` Richard Biener
2021-04-28 12:46   ` Jeff Law

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).