public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
@ 2015-02-03 12:34 Alex.Velenko at arm dot com
  2015-02-03 13:38 ` [Bug rtl-optimization/64916] [5.0 regression] " ramana at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Alex.Velenko at arm dot com @ 2015-02-03 12:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64916
           Summary: ira.c update_equiv_regs patch causes
                    gcc/testsuite/gcc.target/arm/pr43920-2.c regression
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Alex.Velenko at arm dot com
                CC: amker.cheng at gmail dot com, fei.yang0953 at gmail dot com,
                    law at redhat dot com, marcus.shawcroft at arm dot com
             Build: arm-none-eabi

Created attachment 34650
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34650&action=edit
Tar with patched and non-patched rtl dump file tars

In pr43920-2.c code block for "return -1;" c statement is not getting reused
after
ira.c update_equiv_regs patch. I believe svn it's number is r216169.
Reason - patch removes "(expr_list:REG_EQUAL (const_int -1
[0xffffffffffffffff])" note in ira pass, which prevents jump2 optimization.
This information still needs to be passed to jump2 pass.
See rtl dump attachments below.


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

* [Bug rtl-optimization/64916] [5.0 regression] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
@ 2015-02-03 13:38 ` ramana at gcc dot gnu.org
  2015-02-04  2:52 ` amker at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-02-03 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm*
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.8.0, 4.8.1, 4.8.2, 4.9.0,
                   |                            |4.9.1, 4.9.2
   Last reconfirmed|                            |2015-02-03
          Component|testsuite                   |rtl-optimization
                 CC|                            |ramana at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ira.c update_equiv_regs     |[5.0 regression] ira.c
                   |patch causes                |update_equiv_regs patch
                   |gcc/testsuite/gcc.target/ar |causes
                   |m/pr43920-2.c regression    |gcc/testsuite/gcc.target/ar
                   |                            |m/pr43920-2.c regression
      Known to fail|                            |5.0
              Build|arm-none-eabi               |

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Confirmed.


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

* [Bug rtl-optimization/64916] [5.0 regression] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
  2015-02-03 13:38 ` [Bug rtl-optimization/64916] [5.0 regression] " ramana at gcc dot gnu.org
@ 2015-02-04  2:52 ` amker at gcc dot gnu.org
  2015-02-09  0:06 ` [Bug rtl-optimization/64916] [5 " pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amker at gcc dot gnu.org @ 2015-02-04  2:52 UTC (permalink / raw)
  To: gcc-bugs

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

amker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amker at gcc dot gnu.org

--- Comment #2 from amker at gcc dot gnu.org ---
Below is full dump of pr43920-2.c with "-mthumb -mcpu=cortex-m3 -Os" options:

   10: NOTE_INSN_BASIC_BLOCK 2
    2: r116:SI=r0:SI
    3: r117:SI=r1:SI
      REG_DEAD r1:SI
    4: r118:SI=r2:SI
      REG_DEAD r2:SI
    5: NOTE_INSN_FUNCTION_BEG
   12: r2:SI=0x1
   13: r1:SI=0
   15: r0:SI=call [`lseek'] argc:0
      REG_DEAD r2:SI
      REG_DEAD r1:SI
      REG_CALL_DECL `lseek'
   16: r111:SI=r0:SI
      REG_DEAD r0:SI
   17: r2:SI=0x2
   18: r1:SI=0
   19: r0:SI=r116:SI
      REG_DEAD r116:SI
   20: r0:SI=call [`lseek'] argc:0
      REG_DEAD r2:SI
      REG_DEAD r1:SI
      REG_CALL_DECL `lseek'
   21: r112:SI=r0:SI
      REG_DEAD r0:SI
   22: cc:CC=cmp(r111:SI,0xffffffffffffffff)
   23: pc={(cc:CC==0)?L46:pc}
      REG_DEAD cc:CC
      REG_BR_PROB 159
   24: NOTE_INSN_BASIC_BLOCK 3
   25: cc:CC=cmp(r112:SI,0xffffffffffffffff)
   26: pc={(cc:CC==0)?L50:pc}
      REG_DEAD cc:CC
      REG_BR_PROB 159
   27: NOTE_INSN_BASIC_BLOCK 4
   28: NOTE_INSN_DELETED
   29: {cc:CC_NOOV=cmp(r112:SI-r111:SI,0);r114:SI=r112:SI-r111:SI;}
      REG_DEAD r112:SI
   30: pc={(cc:CC_NOOV==0)?L54:pc}
      REG_DEAD cc:CC_NOOV
      REG_BR_PROB 400
   31: NOTE_INSN_BASIC_BLOCK 5
   32: [r117:SI]=r111:SI
      REG_DEAD r117:SI
      REG_DEAD r111:SI
   33: [r118:SI]=r114:SI
      REG_DEAD r118:SI
      REG_DEAD r114:SI
    7: r110:SI=0
      REG_EQUAL 0
   76: pc=L34
   77: barrier
   46: L46:
   45: NOTE_INSN_BASIC_BLOCK 6
    8: r110:SI=r111:SI
      REG_DEAD r111:SI
      REG_EQUAL 0xffffffffffffffff
   78: pc=L34
   79: barrier
   50: L50:
   49: NOTE_INSN_BASIC_BLOCK 7
    6: r110:SI=r112:SI
      REG_DEAD r112:SI
      REG_EQUAL 0xffffffffffffffff
   80: pc=L34
   81: barrier
   54: L54:
   53: NOTE_INSN_BASIC_BLOCK 8
    9: r110:SI=0xffffffffffffffff
      REG_EQUAL 0xffffffffffffffff
   34: L34:
   35: NOTE_INSN_BASIC_BLOCK 9
   40: r0:SI=r110:SI
      REG_DEAD r110:SI
   41: use r0:SI

Before r216169 (with REG_EQUAL in insn9), jumps from basic block 6/7/8 can be
merged because r110 equals to -1 afterwards.  But with the patch, the equal
information of r110==-1 in basic block 8 is lost.  As a result, jump from 8->9
can't be merged and two additional instructions are generated.


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

* [Bug rtl-optimization/64916] [5 regression] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
  2015-02-03 13:38 ` [Bug rtl-optimization/64916] [5.0 regression] " ramana at gcc dot gnu.org
  2015-02-04  2:52 ` amker at gcc dot gnu.org
@ 2015-02-09  0:06 ` pinskia at gcc dot gnu.org
  2015-02-09 23:35 ` [Bug rtl-optimization/64916] " law at redhat dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-09  0:06 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |5.0
   Target Milestone|---                         |5.0
            Summary|[5.0 regression] ira.c      |[5 regression] ira.c
                   |update_equiv_regs patch     |update_equiv_regs patch
                   |causes                      |causes
                   |gcc/testsuite/gcc.target/ar |gcc/testsuite/gcc.target/ar
                   |m/pr43920-2.c regression    |m/pr43920-2.c regression


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (2 preceding siblings ...)
  2015-02-09  0:06 ` [Bug rtl-optimization/64916] [5 " pinskia at gcc dot gnu.org
@ 2015-02-09 23:35 ` law at redhat dot com
  2015-03-12 16:55 ` ramana at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2015-02-09 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[5 regression] ira.c        |ira.c update_equiv_regs
                   |update_equiv_regs patch     |patch causes
                   |causes                      |gcc/testsuite/gcc.target/ar
                   |gcc/testsuite/gcc.target/ar |m/pr43920-2.c regression
                   |m/pr43920-2.c regression    |

--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
Removing the regression marker.

This testcase depended in incorrect behaviour of update_equiv_regs.  So it's
clearly a missed optimization, it does not qualify as a regression IMO.

In particular note that r110 can have two values (0 or -1) thus creating a
REG_EQUIV note for r110 anywhere is wrong.


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (3 preceding siblings ...)
  2015-02-09 23:35 ` [Bug rtl-optimization/64916] " law at redhat dot com
@ 2015-03-12 16:55 ` ramana at gcc dot gnu.org
  2015-04-21  5:23 ` law at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-03-12 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.0                         |---

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Removing the target milestone given that we've agreed it's not a regression.


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (4 preceding siblings ...)
  2015-03-12 16:55 ` ramana at gcc dot gnu.org
@ 2015-04-21  5:23 ` law at gcc dot gnu.org
  2015-04-21  5:41 ` law at redhat dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: law at gcc dot gnu.org @ 2015-04-21  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Tue Apr 21 05:23:08 2015
New Revision: 222256

URL: https://gcc.gnu.org/viewcvs?rev=222256&root=gcc&view=rev
Log:
       PR rtl-optimization/64916
        * cfgcleanup.c (values_equal_p): New function.
        (can_replace_by): Use it.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (5 preceding siblings ...)
  2015-04-21  5:23 ` law at gcc dot gnu.org
@ 2015-04-21  5:41 ` law at redhat dot com
  2015-04-22  8:51 ` Alex.Velenko at arm dot com
  2015-04-22 13:28 ` Alex.Velenko at arm dot com
  8 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2015-04-21  5:41 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by Shiva's patch on the trunk.


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (6 preceding siblings ...)
  2015-04-21  5:41 ` law at redhat dot com
@ 2015-04-22  8:51 ` Alex.Velenko at arm dot com
  2015-04-22 13:28 ` Alex.Velenko at arm dot com
  8 siblings, 0 replies; 10+ messages in thread
From: Alex.Velenko at arm dot com @ 2015-04-22  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Alex Velenko <Alex.Velenko at arm dot com> ---
Just to note, my fix was earlier, yet none replied:
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00441.html


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

* [Bug rtl-optimization/64916] ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression
  2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
                   ` (7 preceding siblings ...)
  2015-04-22  8:51 ` Alex.Velenko at arm dot com
@ 2015-04-22 13:28 ` Alex.Velenko at arm dot com
  8 siblings, 0 replies; 10+ messages in thread
From: Alex.Velenko at arm dot com @ 2015-04-22 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Alex Velenko <Alex.Velenko at arm dot com> ---
Jeff, thank you for noticing this. I don't mind this time, I just hope this
would not happen next time.


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

end of thread, other threads:[~2015-04-22 13:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 12:34 [Bug testsuite/64916] New: ira.c update_equiv_regs patch causes gcc/testsuite/gcc.target/arm/pr43920-2.c regression Alex.Velenko at arm dot com
2015-02-03 13:38 ` [Bug rtl-optimization/64916] [5.0 regression] " ramana at gcc dot gnu.org
2015-02-04  2:52 ` amker at gcc dot gnu.org
2015-02-09  0:06 ` [Bug rtl-optimization/64916] [5 " pinskia at gcc dot gnu.org
2015-02-09 23:35 ` [Bug rtl-optimization/64916] " law at redhat dot com
2015-03-12 16:55 ` ramana at gcc dot gnu.org
2015-04-21  5:23 ` law at gcc dot gnu.org
2015-04-21  5:41 ` law at redhat dot com
2015-04-22  8:51 ` Alex.Velenko at arm dot com
2015-04-22 13:28 ` Alex.Velenko at arm dot com

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