public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/100434] New: DSE fails to DSE aggregate LHS.
@ 2021-05-05 13:55 rguenth at gcc dot gnu.org
  2021-05-05 13:56 ` [Bug tree-optimization/100434] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05 13:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434

            Bug ID: 100434
           Summary: DSE fails to DSE aggregate LHS.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

struct X { int x; };
extern struct X foo (void);
struct X x;
void bar()
{
  x = foo();
  x = (struct X){};
}

the store to x from the call to foo() is not DSEd.  It works for aggregate
copies
x = y; though.

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

* [Bug tree-optimization/100434] DSE fails to DSE aggregate LHS.
  2021-05-05 13:55 [Bug tree-optimization/100434] New: DSE fails to DSE aggregate LHS rguenth at gcc dot gnu.org
@ 2021-05-05 13:56 ` rguenth at gcc dot gnu.org
  2021-05-10  9:41 ` cvs-commit at gcc dot gnu.org
  2021-05-10  9:45 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05 13:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
             Blocks|                            |44462
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Last reconfirmed|                            |2021-05-05

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44462
[Bug 44462] Redundant looping pure functions whose return value is dead are not
optimized out

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

* [Bug tree-optimization/100434] DSE fails to DSE aggregate LHS.
  2021-05-05 13:55 [Bug tree-optimization/100434] New: DSE fails to DSE aggregate LHS rguenth at gcc dot gnu.org
  2021-05-05 13:56 ` [Bug tree-optimization/100434] " rguenth at gcc dot gnu.org
@ 2021-05-10  9:41 ` cvs-commit at gcc dot gnu.org
  2021-05-10  9:45 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-10  9:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:a564da506f52be66ade298b562417641e87b549f

commit r12-656-ga564da506f52be66ade298b562417641e87b549f
Author: Richard Biener <rguenther@suse.de>
Date:   Wed May 5 16:15:12 2021 +0200

    tree-optimization/100434 - DSE aggregate call LHS

    This makes DSE consider aggregate LHS of calls as dead, for pure
    or const calls the whole stmt and for others by removing the LHS.

    2021-05-05  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/100434
            * tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
            call LHS.
            (dse_optimize_stmt): Handle call LHS by dropping the
            LHS or the whole call if it doesn't have other
            side-effects.
            (pass_dse::execute): Adjust.

            * gcc.dg/tree-ssa/ssa-dse-43.c: New testcase.

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

* [Bug tree-optimization/100434] DSE fails to DSE aggregate LHS.
  2021-05-05 13:55 [Bug tree-optimization/100434] New: DSE fails to DSE aggregate LHS rguenth at gcc dot gnu.org
  2021-05-05 13:56 ` [Bug tree-optimization/100434] " rguenth at gcc dot gnu.org
  2021-05-10  9:41 ` cvs-commit at gcc dot gnu.org
@ 2021-05-10  9:45 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-10  9:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-05-10  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 13:55 [Bug tree-optimization/100434] New: DSE fails to DSE aggregate LHS rguenth at gcc dot gnu.org
2021-05-05 13:56 ` [Bug tree-optimization/100434] " rguenth at gcc dot gnu.org
2021-05-10  9:41 ` cvs-commit at gcc dot gnu.org
2021-05-10  9:45 ` rguenth at gcc dot gnu.org

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