public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64895] [5 Regression] RA picks the wrong register for -fipa-ra Date: Sun, 01 Feb 2015 19:25:00 -0000 [thread overview] Message-ID: <bug-64895-4-r3vdNIfq4s@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64895-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64895 --- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> --- From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64342#c9 The test fails due to different and orthogonal issue: RA chooses %ebx for a temporary when -fpic is used: movl %eax, %ebx call bar addl %ebx, %eax The push and pop insns are from prologue/epilogue since call-saved reg is used (%ebx), not due to save/restore the reg around the call: (note 3 4 19 2 NOTE_INSN_FUNCTION_BEG) (insn/f:TI 19 3 20 2 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0 S4 A8]) (reg:SI 3 bx)) fuse-caller-save.c:16 66 {*pushsi2} (expr_list:REG_DEAD (reg:SI 3 bx) (nil))) (note 20 19 2 2 NOTE_INSN_PROLOGUE_END) ... (note 27 15 24 2 NOTE_INSN_EPILOGUE_BEG) (insn/f:TI 24 27 25 2 (set (reg:SI 3 bx) (mem:SI (post_inc:SI (reg/f:SI 7 sp)) [0 S4 A8])) fuse-caller-save.c:18 74 {*popsi1} (expr_list:REG_CFA_ADJUST_CFA (set (reg/f:SI 7 sp) (plus:SI (reg/f:SI 7 sp) (const_int 4 [0x4]))) (expr_list:REG_CFA_RESTORE (reg:SI 3 bx) (nil)))) So, please open a new PR due to RA issue: since %edx was allocated for PIC register (but later removed), another call-used (%ecx) should be used here.
next prev parent reply other threads:[~2015-02-01 19:25 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-01 13:47 [Bug rtl-optimization/64895] New: " hjl.tools at gmail dot com 2015-02-01 19:09 ` [Bug rtl-optimization/64895] " jakub at gcc dot gnu.org 2015-02-01 19:22 ` hjl.tools at gmail dot com 2015-02-01 19:24 ` jakub at gcc dot gnu.org 2015-02-01 19:25 ` hjl.tools at gmail dot com [this message] 2015-03-06 8:04 ` [Bug rtl-optimization/64895] " ubizjak at gmail dot com 2015-03-10 10:24 ` vries at gcc dot gnu.org 2015-03-10 19:21 ` vmakarov at gcc dot gnu.org 2015-03-12 11:11 ` vries at gcc dot gnu.org 2015-03-12 11:27 ` vries at gcc dot gnu.org 2015-03-16 9:42 ` vries at gcc dot gnu.org 2015-03-16 9:44 ` jakub 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-64895-4-r3vdNIfq4s@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).