public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
@ 2012-07-21 12:05 mikpe at it dot uu.se
  2012-07-21 18:47 ` [Bug target/54063] " mikpe at it dot uu.se
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: mikpe at it dot uu.se @ 2012-07-21 12:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

             Bug #: 54063
           Summary: [4.8 regression] on powerpc64 gcc 4.8 generates larger
                    code for global variable accesses than gcc 4.7
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mikpe@it.uu.se


Consider this trivial test case, which scans for an element in a doubly-linked
list that uses a separate sentinel object to represent the head and tail of the
list:

struct list {
    struct list *next, *prev;
    int k;
} head = { &head, &head, 0 };

int lookup(int k)
{
    struct list *list = head.next;
    while (list != &head) {
        if (list->k == k)
            return 1;
        list = list->next;
    }
    return 0;
}

The code generated by gcc 4.8 and 4.7 on powerpc64-linux for this test case is
similar, except gcc 4.8 generates an additional instruction at the start of the
function when computing the address of the global variable 'head':

@@ -11,25 +11,26 @@
        .previous
        .type   lookup, @function
 .L.lookup:
+       addis 10,2,.LANCHOR0@toc@ha
        addis 8,2,.LANCHOR0@toc@ha
-       ld 9,.LANCHOR0@toc@l(8)
+       ld 9,.LANCHOR0@toc@l(10)
        addi 8,8,.LANCHOR0@toc@l
        cmpd 7,9,8

The rest is the same, modulo the numbers chosen for the labels.

The test case is reduced from similar code in the Linux kernel, see PR54062.


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

* [Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
@ 2012-07-21 18:47 ` mikpe at it dot uu.se
  2012-07-23  2:14 ` amodra at gmail dot com
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: mikpe at it dot uu.se @ 2012-07-21 18:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Mikael Pettersson <mikpe at it dot uu.se> changed:

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

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-07-21 18:47:30 UTC ---
It's caused by Alan Modra's "rs6000 toc reference rtl again" change in r187699:
http://gcc.gnu.org/ml/gcc-cvs/2012-05/msg00696.html
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00006.html

Here's the diff in output from r187698 and r187699 on this test case:

--- glovar.s-r187698    2012-07-21 20:31:01.000000000 +0200
+++ glovar.s-r187699    2012-07-21 20:35:59.000000000 +0200
@@ -11,8 +11,9 @@
        .previous
        .type   lookup, @function
 .L.lookup:
+       addis 10,2,.LANCHOR0@toc@ha
        addis 8,2,.LANCHOR0@toc@ha
-       ld 9,.LANCHOR0@toc@l(8)
+       ld 9,.LANCHOR0@toc@l(10)
        addi 8,8,.LANCHOR0@toc@l
        cmpd 7,9,8
        bne 7,.L4


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

* [Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
  2012-07-21 18:47 ` [Bug target/54063] " mikpe at it dot uu.se
@ 2012-07-23  2:14 ` amodra at gmail dot com
  2012-07-23  8:27 ` rguenth at gcc dot gnu.org
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amodra at gmail dot com @ 2012-07-23  2:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #2 from Alan Modra <amodra at gmail dot com> 2012-07-23 02:13:53 UTC ---
Gultiy as charged.  Not splitting the address early loses some opportunities
for common subexpression eliminiation.

However, splitting the address early
a) is inconsistent with the treatment of other powerpc addresses
b) can result in incorrect code and/or require hacks (that pessimise
scheduling) to prevent incorrect code in other cases, eg. indirect function
call sequence.
c) can result in silly uses of call-saved regs for the high part of an address
calculation around a call or outside of a loop, when it would be far better to
just recalculate an address thus freeing the reg for better uses.
d) can allow the high/low parts to move in ways that result in the linker
disabling optimisation of these sequences for the entire object file (or
generating bad code if you have an old linker).  eg. another kernel case where
the low part moved to a different (hot/cold) section.

Overall, I think we get better code by *not* splitting early, particularly for
larger functions that run into (c).


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

* [Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
  2012-07-21 18:47 ` [Bug target/54063] " mikpe at it dot uu.se
  2012-07-23  2:14 ` amodra at gmail dot com
@ 2012-07-23  8:27 ` rguenth at gcc dot gnu.org
  2012-09-19 13:57 ` rguenth at gcc dot gnu.org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-23  8:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (2 preceding siblings ...)
  2012-07-23  8:27 ` rguenth at gcc dot gnu.org
@ 2012-09-19 13:57 ` rguenth at gcc dot gnu.org
  2012-12-04 13:05 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-19 13:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-09-19
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-19 13:56:43 UTC ---
So, WONTFIX?


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

* [Bug target/54063] [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (3 preceding siblings ...)
  2012-09-19 13:57 ` rguenth at gcc dot gnu.org
@ 2012-12-04 13:05 ` jakub at gcc dot gnu.org
  2013-03-22 14:44 ` [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 " jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-04 13:05 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-04 13:05:05 UTC ---
While the memory load is split already during reload, the set for &head is only
split during split2 pass, which is after postreload_cse (and gcse2) which are
the last CSE-ish passes I think.  So perhaps you could tweak machine reorg pass
to handle some of the easy cases, or what exactly is the reason for running
split2 after postreload CSE instead of before it?


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

* [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (4 preceding siblings ...)
  2012-12-04 13:05 ` jakub at gcc dot gnu.org
@ 2013-03-22 14:44 ` jakub at gcc dot gnu.org
  2013-05-31 10:58 ` jakub at gcc dot gnu.org
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.0                       |4.8.1

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:43:45 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.


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

* [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (5 preceding siblings ...)
  2013-03-22 14:44 ` [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-05-31 10:58 ` jakub at gcc dot gnu.org
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 10:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.1                       |4.8.2

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.


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

* [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (6 preceding siblings ...)
  2013-05-31 10:58 ` jakub at gcc dot gnu.org
@ 2013-10-16  9:49 ` jakub at gcc dot gnu.org
  2013-10-25 11:10 ` rguenth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


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

* [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (7 preceding siblings ...)
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
@ 2013-10-25 11:10 ` rguenth at gcc dot gnu.org
  2014-05-22  9:03 ` [Bug target/54063] [4.8/4.9/4.10 regression] on powerpc64 gcc 4.8/4.9/4.10 " rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-25 11:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug target/54063] [4.8/4.9/4.10 regression] on powerpc64 gcc 4.8/4.9/4.10 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (8 preceding siblings ...)
  2013-10-25 11:10 ` rguenth at gcc dot gnu.org
@ 2014-05-22  9:03 ` rguenth at gcc dot gnu.org
  2014-12-19 13:25 ` [Bug target/54063] [4.8/4.9/5 regression] on powerpc64 gcc 4.8/4.9/5 " jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-22  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.3                       |4.8.4

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 4.8.3 is being released, adjusting target milestone.


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

* [Bug target/54063] [4.8/4.9/5 regression] on powerpc64 gcc 4.8/4.9/5 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (9 preceding siblings ...)
  2014-05-22  9:03 ` [Bug target/54063] [4.8/4.9/4.10 regression] on powerpc64 gcc 4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:25 ` jakub at gcc dot gnu.org
  2015-03-24 18:47 ` steven at gcc dot gnu.org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug target/54063] [4.8/4.9/5 regression] on powerpc64 gcc 4.8/4.9/5 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (10 preceding siblings ...)
  2014-12-19 13:25 ` [Bug target/54063] [4.8/4.9/5 regression] on powerpc64 gcc 4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-03-24 18:47 ` steven at gcc dot gnu.org
  2015-06-23  8:17 ` [Bug target/54063] [4.8/4.9/5/6 regression] on powerpc64 gcc 4.8/4.9/5/6 " rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: steven at gcc dot gnu.org @ 2015-03-24 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
                 CC|                            |steven at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |steven at gcc dot gnu.org

--- Comment #10 from Steven Bosscher <steven at gcc dot gnu.org> ---
May be related to PR64317? I'll check that...


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

* [Bug target/54063] [4.8/4.9/5/6 regression] on powerpc64 gcc 4.8/4.9/5/6 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (11 preceding siblings ...)
  2015-03-24 18:47 ` steven at gcc dot gnu.org
@ 2015-06-23  8:17 ` rguenth at gcc dot gnu.org
  2015-06-26 19:55 ` [Bug target/54063] [4.9/5/6 regression] on powerpc64 gcc 4.9/5/6 " jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


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

* [Bug target/54063] [4.9/5/6 regression] on powerpc64 gcc 4.9/5/6 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (12 preceding siblings ...)
  2015-06-23  8:17 ` [Bug target/54063] [4.8/4.9/5/6 regression] on powerpc64 gcc 4.8/4.9/5/6 " rguenth at gcc dot gnu.org
@ 2015-06-26 19:55 ` jakub at gcc dot gnu.org
  2015-06-26 20:27 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug target/54063] [4.9/5/6 regression] on powerpc64 gcc 4.9/5/6 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (13 preceding siblings ...)
  2015-06-26 19:55 ` [Bug target/54063] [4.9/5/6 regression] on powerpc64 gcc 4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:27 ` jakub at gcc dot gnu.org
  2020-03-12 11:58 ` [Bug target/54063] [8/9/10 regression] on powerpc64 gcc 4.9/8 " jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

* [Bug target/54063] [8/9/10 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (14 preceding siblings ...)
  2015-06-26 20:27 ` jakub at gcc dot gnu.org
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
  2021-06-01  8:05 ` [Bug target/54063] [9/10/11/12 " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.3                         |9.4

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.

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

* [Bug target/54063] [9/10/11/12 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (15 preceding siblings ...)
  2020-03-12 11:58 ` [Bug target/54063] [8/9/10 regression] on powerpc64 gcc 4.9/8 " jakub at gcc dot gnu.org
@ 2021-06-01  8:05 ` rguenth at gcc dot gnu.org
  2021-11-30 14:38 ` roger at nextmovesoftware dot com
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug target/54063] [9/10/11/12 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (16 preceding siblings ...)
  2021-06-01  8:05 ` [Bug target/54063] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-11-30 14:38 ` roger at nextmovesoftware dot com
  2021-11-30 17:00 ` segher at gcc dot gnu.org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: roger at nextmovesoftware dot com @ 2021-11-30 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot com

--- Comment #22 from Roger Sayle <roger at nextmovesoftware dot com> ---
I think this is now fixed on mainline?  Alas godbolt doesn't provide a
historical suite of GCC compilers for powerpc64, so figuring out exactly when
this was resolved is non-trivial.  However, a cross-compiler to
powerpc64-linux-gnu currently generates the following for lookup with -O2:

lookup: ld 8,.LC0@toc(2)
        ld 9,0(8)
        cmpd 0,9,8
        bne 0,.L3
        b .L4
.L8:    ld 9,0(9)
        cmpd 0,9,8
        beq 0,.L4
.L3:    lwz 10,16(9)
        cmpw 0,10,3
        bne 0,.L8
        li 3,1
        extsw 3,3
        blr
.L4:    li 3,0
        extsw 3,3
        blr

Only one mention of "toc".  Apologies if this is an inappropriate metric.

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

* [Bug target/54063] [9/10/11/12 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (17 preceding siblings ...)
  2021-11-30 14:38 ` roger at nextmovesoftware dot com
@ 2021-11-30 17:00 ` segher at gcc dot gnu.org
  2022-05-27  9:34 ` [Bug target/54063] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: segher at gcc dot gnu.org @ 2021-11-30 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Trunk does

lookup:
        .quad   .L.lookup,.TOC.@tocbase,0
        .previous
        .type   lookup, @function
.L.lookup:
.LFB0:
        .cfi_startproc
        addis 9,2,.LANCHOR0@toc@ha
        ld 9,.LANCHOR0@toc@l(9)
        addis 8,2,.LANCHOR0@toc@ha
        addi 8,8,.LANCHOR0@toc@l
        cmpd 0,9,8
        bne 0,.L3
        b .L4

so no, not fixed.

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

* [Bug target/54063] [10/11/12/13 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (18 preceding siblings ...)
  2021-11-30 17:00 ` segher at gcc dot gnu.org
@ 2022-05-27  9:34 ` rguenth at gcc dot gnu.org
  2022-06-28 10:30 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug target/54063] [10/11/12/13 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (19 preceding siblings ...)
  2022-05-27  9:34 ` [Bug target/54063] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:30 ` jakub at gcc dot gnu.org
  2023-04-20  8:46 ` [Bug target/54063] [10/11/12/13/14 " guihaoc at gcc dot gnu.org
  2023-07-07 10:29 ` [Bug target/54063] [11/12/13/14 " rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug target/54063] [10/11/12/13/14 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (20 preceding siblings ...)
  2022-06-28 10:30 ` jakub at gcc dot gnu.org
@ 2023-04-20  8:46 ` guihaoc at gcc dot gnu.org
  2023-07-07 10:29 ` [Bug target/54063] [11/12/13/14 " rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-04-20  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

HaoChen Gui <guihaoc at gcc dot gnu.org> changed:

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

--- Comment #26 from HaoChen Gui <guihaoc at gcc dot gnu.org> ---
I made an experiment to move the split of "tocref<mod>" berfore the reload (do
it at split1). The additional addis can be optimized out by postreload cse on
P9. Also Tested SPEC 2017, it seems not hit the problems Alan pointed out. But,
there are several other issues.
1. The optimization relies on the sequence of insns. On P8, the memory load
insn is moved ahead to the second addis by sched pass. So the postreload cse
can't optimzies it as the r9 is used by the load.
2. The patch causes different register assignment. By comparing the object
files in SPEC, we can see that the register assignment changes and it tends to
use less registers with the patch. 
3. The patch has side effect on BB head merging in jump2 pass. The sched pass
commonly separates the two tocref insns if they're already split. Thus the
sequence of insns in two branche arms might be changed. Sometime the BB head
merging can be done with the patch, can't be done without the patch. While
sometime it can't be done with the patch, but it can be done without the patch.
The both positive and negative examples can be found in object files.

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

* [Bug target/54063] [11/12/13/14 regression] on powerpc64 gcc 4.9/8 generates larger code for global variable accesses than gcc 4.7
  2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
                   ` (21 preceding siblings ...)
  2023-04-20  8:46 ` [Bug target/54063] [10/11/12/13/14 " guihaoc at gcc dot gnu.org
@ 2023-07-07 10:29 ` rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

end of thread, other threads:[~2023-07-07 10:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-21 12:05 [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 mikpe at it dot uu.se
2012-07-21 18:47 ` [Bug target/54063] " mikpe at it dot uu.se
2012-07-23  2:14 ` amodra at gmail dot com
2012-07-23  8:27 ` rguenth at gcc dot gnu.org
2012-09-19 13:57 ` rguenth at gcc dot gnu.org
2012-12-04 13:05 ` jakub at gcc dot gnu.org
2013-03-22 14:44 ` [Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 " jakub at gcc dot gnu.org
2013-05-31 10:58 ` jakub at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2013-10-25 11:10 ` rguenth at gcc dot gnu.org
2014-05-22  9:03 ` [Bug target/54063] [4.8/4.9/4.10 regression] on powerpc64 gcc 4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug target/54063] [4.8/4.9/5 regression] on powerpc64 gcc 4.8/4.9/5 " jakub at gcc dot gnu.org
2015-03-24 18:47 ` steven at gcc dot gnu.org
2015-06-23  8:17 ` [Bug target/54063] [4.8/4.9/5/6 regression] on powerpc64 gcc 4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:55 ` [Bug target/54063] [4.9/5/6 regression] on powerpc64 gcc 4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:27 ` jakub at gcc dot gnu.org
2020-03-12 11:58 ` [Bug target/54063] [8/9/10 regression] on powerpc64 gcc 4.9/8 " jakub at gcc dot gnu.org
2021-06-01  8:05 ` [Bug target/54063] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-11-30 14:38 ` roger at nextmovesoftware dot com
2021-11-30 17:00 ` segher at gcc dot gnu.org
2022-05-27  9:34 ` [Bug target/54063] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-04-20  8:46 ` [Bug target/54063] [10/11/12/13/14 " guihaoc at gcc dot gnu.org
2023-07-07 10:29 ` [Bug target/54063] [11/12/13/14 " 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).