public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54063] New: [4.8 regression] on powerpc64 gcc 4.8 generates larger code for global variable accesses than gcc 4.7 Date: Sat, 21 Jul 2012 12:05:00 -0000 [thread overview] Message-ID: <bug-54063-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2012-07-21 12:05 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-21 12:05 mikpe at it dot uu.se [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-54063-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).