public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amker.cheng at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin Date: Sat, 20 Oct 2012 05:40:00 -0000 [thread overview] Message-ID: <bug-54989-4-QRubzf6bMJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54989-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989 bin.cheng <amker.cheng at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amker.cheng at gmail dot | |com --- Comment #1 from bin.cheng <amker.cheng at gmail dot com> 2012-10-20 05:40:08 UTC --- The failure is caused by higher register pressure in the THEN branch of the case, though I am not sure why the register pressure is higher than x86-linux. This can be fixed by simplifying test case as below: /* { dg-options "-Os -fdump-rtl-hoist" } */ /* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */ #define BUF 100 int a[BUF]; void com (int); void bar (int); int foo (int x, int y, int z) { /* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled, because its rtx_cost is too small. */ if (z) { a[1] = a[0]; a[2] = a[1]; a[3] = a[2]; a[4] = a[3]; a[5] = a[4]; a[6] = a[5]; a[7] = a[6]; com (x+y); } else { bar (x+y); } return 0; } I will send a patch fixing this.
next prev parent reply other threads:[~2012-10-20 5:40 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-19 16:42 [Bug target/54989] New: " howarth at nitro dot med.uc.edu 2012-10-20 5:40 ` amker.cheng at gmail dot com [this message] 2012-10-20 12:07 ` [Bug target/54989] " steven at gcc dot gnu.org 2012-10-20 17:11 ` howarth at nitro dot med.uc.edu 2012-10-20 17:40 ` howarth at nitro dot med.uc.edu 2012-10-20 17:45 ` dominiq at lps dot ens.fr 2012-10-30 2:18 ` amker at gcc dot gnu.org 2012-10-31 8:46 ` amker.cheng at gmail dot com 2012-10-31 19:39 ` howarth at nitro dot med.uc.edu
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-54989-4-QRubzf6bMJ@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).