public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu
@ 2020-05-17  5:48 qrzhang at gatech dot edu
  2020-05-18  5:56 ` [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53 marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: qrzhang at gatech dot edu @ 2020-05-17  5:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95172
           Summary: wrong code at -O1 on x86_64-linux-gnu
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qrzhang at gatech dot edu
  Target Milestone: ---

Recent regression. Bisection points to g:b6ff3ddecfa93d53867afaaa078f85f


$ gcc-trunk -v
gcc version 11.0.0 20200516 (experimental) [master revision
53b4d52f114:91c1d944166:f5b461d453043c6b6dda50db0439e4c78b241f03] (GCC)

$ gcc-trunk -O1 abc.c ; ./a.out
1

$ gcc-trunk  abc.c ; ./a.out
0

$ cat abc.c
int a, d;
int *b = &a;
short c;
int main() {
  for (; c <= 4; c--) {
    for (; d;)
      ;
    a = 1;
    *b = 0;
  }
  printf("%d\n", a);
}

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

* [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53
  2020-05-17  5:48 [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu qrzhang at gatech dot edu
@ 2020-05-18  5:56 ` marxin at gcc dot gnu.org
  2020-05-18  6:26 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-18  5:56 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-05-18
     Ever confirmed|0                           |1
      Known to fail|                            |11.0
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
            Summary|[11 Regression] wrong code  |[11 Regression] wrong code
                   |at -O1 on x86_64-linux-gnu  |at -O1 on x86_64-linux-gnu
                   |                            |since
                   |                            |r11-272-gb6ff3ddecfa93d53
           Priority|P3                          |P1
   Target Milestone|---                         |11.0
      Known to work|                            |10.1.0

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed.

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

* [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53
  2020-05-17  5:48 [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu qrzhang at gatech dot edu
  2020-05-18  5:56 ` [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53 marxin at gcc dot gnu.org
@ 2020-05-18  6:26 ` rguenth at gcc dot gnu.org
  2020-05-18  9:50 ` cvs-commit at gcc dot gnu.org
  2020-05-18  9:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-18  6:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
            Version|unknown                     |11.0

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

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

* [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53
  2020-05-17  5:48 [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu qrzhang at gatech dot edu
  2020-05-18  5:56 ` [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53 marxin at gcc dot gnu.org
  2020-05-18  6:26 ` rguenth at gcc dot gnu.org
@ 2020-05-18  9:50 ` cvs-commit at gcc dot gnu.org
  2020-05-18  9:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-18  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:52a0f83980082c9995f2d8ec9b88548520fb8a5f

commit r11-450-g52a0f83980082c9995f2d8ec9b88548520fb8a5f
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 18 09:17:24 2020 +0200

    tree-optimization/95172 - avoid mixing conditionalized and ordered SM

    The following testcase shows a missed optimization that then leads to
    wrong-code when issueing SMed stores on exits.  When we were able to
    compute an ordered sequence of stores for an exit we need to emit
    that in the correct order and we can emit it disregarding to any
    conditional for whether a store actually happened (we know it did).
    We can also improve detection as of whether we need conditional
    processing at all.  Both parts fix the testcase.

    2020-05-18  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/95172
            * tree-ssa-loop-im.c (execute_sm): Get flag whether we
            eventually need the conditional processing.
            (execute_sm_exit): When processing an orderd sequence
            avoid doing any conditional processing.
            (hoist_memory_references): Pass down whether all edges
            have ordered processing for a ref to execute_sm.

            * gcc.dg/torture/pr95172.c: New testcase.

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

* [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53
  2020-05-17  5:48 [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu qrzhang at gatech dot edu
                   ` (2 preceding siblings ...)
  2020-05-18  9:50 ` cvs-commit at gcc dot gnu.org
@ 2020-05-18  9:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-18  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
[Bug 57359] store motion causes wrong code for union access at -O3

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

end of thread, other threads:[~2020-05-18  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-17  5:48 [Bug tree-optimization/95172] New: wrong code at -O1 on x86_64-linux-gnu qrzhang at gatech dot edu
2020-05-18  5:56 ` [Bug tree-optimization/95172] [11 Regression] wrong code at -O1 on x86_64-linux-gnu since r11-272-gb6ff3ddecfa93d53 marxin at gcc dot gnu.org
2020-05-18  6:26 ` rguenth at gcc dot gnu.org
2020-05-18  9:50 ` cvs-commit at gcc dot gnu.org
2020-05-18  9:50 ` 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).