public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
@ 2012-10-19 16:42 howarth at nitro dot med.uc.edu
2012-10-20 5:40 ` [Bug target/54989] " amker.cheng at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-10-19 16:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
Bug #: 54989
Summary: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump
hoist "PRE/HOIST: end of bb .* copying expression" on
darwin
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: howarth@nitro.med.uc.edu
Created attachment 28494
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28494
assembly file for gcc.dg/hoist-register-pressure.c on x86_64-apple-darwin12 at
-m32
On x86_64-apple-darwin12, the new testcase for hoisting fails as...
FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of
bb .* copying expression"
at -m32 and r192611. The test passes at -m64.
Using built-in specs.
COLLECT_GCC=gcc-fsf-4.8
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.8/libexec/gcc/x86_64-apple-darwin12.2.0/4.8.0/lto-wrapper
Target: x86_64-apple-darwin12.2.0
Configured with: ../gcc-4.8-20121019/configure --prefix=/sw
--prefix=/sw/lib/gcc4.8 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.8/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --enable-checking=yes --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.8
Thread model: posix
gcc version 4.8.0 20121019 (experimental) (GCC)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
@ 2012-10-20 5:40 ` amker.cheng at gmail dot com
2012-10-20 12:07 ` steven at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: amker.cheng at gmail dot com @ 2012-10-20 5:40 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
2012-10-20 5:40 ` [Bug target/54989] " amker.cheng at gmail dot com
@ 2012-10-20 12:07 ` steven at gcc dot gnu.org
2012-10-20 17:11 ` howarth at nitro dot med.uc.edu
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu.org @ 2012-10-20 12:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|steven at gcc dot gnu.org |
--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-10-20 12:07:07 UTC ---
(In reply to comment #1)
> 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.
You can try and see if this fails on x86-linux with -fPIC. IIRC that's
the default for darwin.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
2012-10-20 5:40 ` [Bug target/54989] " amker.cheng at gmail dot com
2012-10-20 12:07 ` 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
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-10-20 17:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-20 17:11:16 UTC ---
(In reply to comment #1)
> 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.
>
In case it helps, the exact compiler defaults on darwin are...
# GNU C++ (GCC) version 4.8.0 20121019 (experimental)
(x86_64-apple-darwin12.2.0)
# compiled by GNU C version 4.8.0 20121019 (experimental), GMP version
5.0.5, MPFR version 3.1.1, MPC version 1.0.1
# GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
# options passed: -D__DYNAMIC__ t.cc -fPIC -mmacosx-version-min=10.8.2
# -mtune=core2 -fverbose-asm
# options enabled: -Wnonportable-cfstrings -fPIC
# -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon
# -fdelete-null-pointer-checks -fearly-inlining
# -feliminate-unused-debug-types -fexceptions -ffunction-cse -fgcse-lm
# -fident -finline-atomics -fira-hoist-pressure -fira-share-save-slots
# -fira-share-spill-slots -fivopts -fkeep-static-consts
# -fleading-underscore -fmath-errno -fmerge-debug-strings
# -fmove-loop-invariants -fnext-runtime -fobjc-abi-version= -fpeephole
# -fprefetch-loop-arrays -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -fstrict-volatile-bitfields -fsync-libcalls
# -ftrapping-math -ftree-coalesce-vars -ftree-cselim -ftree-forwprop
# -ftree-loop-if-convert -ftree-loop-im -ftree-loop-ivcanon
# -ftree-loop-optimize -ftree-parallelize-loops= -ftree-phiprop -ftree-pta
# -ftree-reassoc -ftree-scev-cprop -ftree-slp-vectorize
# -ftree-vect-loop-version -funit-at-a-time -funwind-tables -fverbose-asm
# -fzero-initialized-in-bss -gstrict-dwarf -m128bit-long-double -m64
# -m80387 -maccumulate-outgoing-args -malign-stringops -matt-stubs
# -mconstant-cfstrings -mfancy-math-387 -mfp-ret-in-387 -mieee-fp
# -mlong-double-80 -mmmx -mno-sse4 -mpush-args -mred-zone -msse -msse2
# -msse3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
` (2 preceding siblings ...)
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
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-10-20 17:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-20 17:39:45 UTC ---
(In reply to comment #1)
i can confirm that the proposed simplification of the test cases eliminates the
failures of hoist-register-pressure.c at -m32 on x86_64-apple-darwin12. I can
also confirm that the original test case passes if -fno-PIC is added to
dg-options.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
` (3 preceding siblings ...)
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
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-20 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-20
Ever Confirmed|0 |1
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-20 17:44:50 UTC ---
I also see it on x86_64-apple-darwin10.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
` (4 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: amker at gcc dot gnu.org @ 2012-10-30 2:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
--- Comment #6 from amker at gcc dot gnu.org 2012-10-30 02:17:57 UTC ---
Author: amker
Date: Tue Oct 30 02:17:50 2012
New Revision: 192976
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192976
Log:
PR target/54989
* gcc.dg/hoist-register-pressure-1.c: Rename from
hoist-register-pressure.c. Add nonpic condition.
* gcc.dg/hoist-register-pressure-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/hoist-register-pressure-1.c
trunk/gcc/testsuite/gcc.dg/hoist-register-pressure-2.c
Removed:
trunk/gcc/testsuite/gcc.dg/hoist-register-pressure.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
` (5 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: amker.cheng at gmail dot com @ 2012-10-31 8:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
--- Comment #7 from bin.cheng <amker.cheng at gmail dot com> 2012-10-31 08:45:37 UTC ---
I think this is fixed and it's a bug in 4.8.0.
Hi Jack, could you verify that it is fixed? Thanks very much.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
` (6 preceding siblings ...)
2012-10-31 8:46 ` amker.cheng at gmail dot com
@ 2012-10-31 19:39 ` howarth at nitro dot med.uc.edu
7 siblings, 0 replies; 9+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-10-31 19:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989
Jack Howarth <howarth at nitro dot med.uc.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-31 19:39:05 UTC ---
I can confirm that both gcc.dg/hoist-register-pressure-1.c and
gcc.dg/hoist-register-pressure-2.c now pass at -m32/-m64 on
x86_64-apple-darwin12 at r193038.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-31 19:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19 16:42 [Bug target/54989] New: FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin howarth at nitro dot med.uc.edu
2012-10-20 5:40 ` [Bug target/54989] " amker.cheng at gmail dot com
2012-10-20 12:07 ` 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
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).