public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58139] PowerPC volatile VSX register live across call Date: Mon, 12 Aug 2013 22:05:00 -0000 [thread overview] Message-ID: <bug-58139-4-f2uNeHSU7q@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-58139-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139 --- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> --- This looks like a scheduling bug. Just before sched2, we have: (call_insn 29 28 31 2 (parallel [ (set (reg:DF 33 1) (call (mem:SI (symbol_ref:DI ("log") [flags 0x41] <function_decl 0xfff92c41200 log>) [0 __builtin_log S4 A8]) (const_int 64 [0x40]))) (use (const_int 0 [0])) (clobber (reg:SI 65 lr)) ]) bug.c:17 509 {*call_value_nonlocal_aix64} (expr_list:REG_EH_REGION (const_int 0 [0]) (nil)) (expr_list:REG_NON_LOCAL_GOTO (use (reg:DF 33 1)) (nil))) (insn 31 29 34 2 (set (reg:V2DF 62 30 [orig:140 vb0 ] [140]) (unspec:V2DF [ (reg/v:DF 62 30 [orig:123 b0 ] [123]) (reg/v:DF 61 29 [orig:125 b1 ] [125]) ] UNSPEC_VSX_CONCAT)) bug.c:18 920 {vsx_concat_v2df} (expr_list:REG_DEAD (reg/v:DF 61 29 [orig:125 b1 ] [125]) (expr_list:REG_EQUIV (mem:V2DF (reg/v/f:DI 30 30 [orig:133 B ] [133]) [2 MEM[(__vector double *)B_2(D)]+0 S16 A128]) (nil)))) Here, insn 31 sets VSX reg 62 (ie, fpr30,vsr30). In DFmode, reg 62 is a non-volatile register, but in V2DFmode, it is volatile. After sched2, we have: insn:TI 31 28 29 2 (set (reg:V2DF 62 30 [orig:140 vb0 ] [140]) (unspec:V2DF [ (reg/v:DF 62 30 [orig:123 b0 ] [123]) (reg/v:DF 61 29 [orig:125 b1 ] [125]) ] UNSPEC_VSX_CONCAT)) bug.c:18 920 {vsx_concat_v2df} (expr_list:REG_DEAD (reg/v:DF 61 29 [orig:125 b1 ] [125]) (expr_list:REG_EQUIV (mem:V2DF (reg/v/f:DI 30 30 [orig:133 B ] [133]) [2 MEM[(__vector double *)B_2(D)]+0 S16 A128]) (nil)))) (call_insn 29 31 72 2 (parallel [ (set (reg:DF 33 1) (call (mem:SI (symbol_ref:DI ("log") [flags 0x41] <function_decl 0xfff92c41200 log>) [0 __builtin_log S4 A8]) (const_int 64 [0x40]))) (use (const_int 0 [0])) (clobber (reg:SI 65 lr)) ]) bug.c:17 509 {*call_value_nonlocal_aix64} (expr_list:REG_EH_REGION (const_int 0 [0]) (nil)) (expr_list:REG_NON_LOCAL_GOTO (use (reg:DF 33 1)) (nil))) So it looks like the scheduler is somehow thinking that reg 62 is non-volatile when it's really volatile in V2DFmode and moving it before the call which ends up clobbering it. Still digging.
next prev parent reply other threads:[~2013-08-12 22:05 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-08-12 17:15 [Bug target/58139] New: " dje at gcc dot gnu.org 2013-08-12 17:17 ` [Bug target/58139] " dje at gcc dot gnu.org 2013-08-12 22:05 ` bergner at gcc dot gnu.org [this message] 2013-08-14 17:13 ` bergner at gcc dot gnu.org 2013-09-05 14:09 ` bergner at gcc dot gnu.org 2013-09-05 14:17 ` bergner at gcc dot gnu.org 2013-09-05 17:28 ` dominiq at lps dot ens.fr 2013-09-05 21:14 ` meissner at gcc dot gnu.org 2013-09-05 21:27 ` dominiq at lps dot ens.fr 2013-09-05 22:08 ` hjl.tools at gmail dot com 2013-09-05 22:31 ` bergner at gcc dot gnu.org 2013-09-05 23:31 ` dominiq at lps dot ens.fr 2014-01-16 14:57 ` bergner at gcc dot gnu.org 2014-03-26 0:44 ` macro@linux-mips.org 2014-03-26 21:36 ` bergner at gcc dot gnu.org 2014-03-26 22:05 ` macro@linux-mips.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-58139-4-f2uNeHSU7q@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).