This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
- From: "amker.cheng at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Oct 2012 05:40:08 +0000
- Subject: [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
- Auto-submitted: auto-generated
- References: <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.