public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/53914] New: poor code generated for offset addressing on ppc32
@ 2012-07-10 13:21 amodra at gmail dot com
2012-07-10 13:33 ` [Bug target/53914] " amodra at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: amodra at gmail dot com @ 2012-07-10 13:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
Bug #: 53914
Summary: poor code generated for offset addressing on ppc32
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: amodra@gmail.com
/* -m32 -O2 code for f5 thru f12 store y to a stack slot, load that to
a fpr, then store the fpr. The other function store y directly
from the input r5 and r6 as expected. */
void f1 (void *x, long long y) { *(long long *) (x + 32767) = y; }
void f2 (void *x, long long y) { *(long long *) (x + 32766) = y; }
void f3 (void *x, long long y) { *(long long *) (x + 32765) = y; }
void f4 (void *x, long long y) { *(long long *) (x + 32764) = y; }
void f5 (void *x, long long y) { *(long long *) (x + 32763) = y; }
void f6 (void *x, long long y) { *(long long *) (x + 32762) = y; }
void f7 (void *x, long long y) { *(long long *) (x + 32761) = y; }
void f8 (void *x, long long y) { *(long long *) (x + 32760) = y; }
void f9 (void *x, long long y) { *(long long *) (x + 32759) = y; }
void f10 (void *x, long long y) { *(long long *) (x + 32758) = y; }
void f11 (void *x, long long y) { *(long long *) (x + 32757) = y; }
void f12 (void *x, long long y) { *(long long *) (x + 32756) = y; }
void f13 (void *x, long long y) { *(long long *) (x + 32755) = y; }
void f14 (void *x, long long y) { *(long long *) (x + 32754) = y; }
void f15 (void *x, long long y) { *(long long *) (x + 32753) = y; }
void f16 (void *x, long long y) { *(long long *) (x + 32752) = y; }
void f17 (void *x, long long y) { *(long long *) (x + 32751) = y; }
void f18 (void *x, long long y) { *(long long *) (x + 32750) = y; }
void f19 (void *x, long long y) { *(long long *) (x + 32749) = y; }
void f20 (void *x, long long y) { *(long long *) (x + 32748) = y; }
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/53914] poor code generated for offset addressing on ppc32
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
@ 2012-07-10 13:33 ` amodra at gmail dot com
2012-07-10 13:37 ` amodra at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: amodra at gmail dot com @ 2012-07-10 13:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |powerpc-linux
--- Comment #1 from Alan Modra <amodra at gmail dot com> 2012-07-10 13:32:47 UTC ---
Appears to be caused by "o" constraint in movdi_internal32 used for gpr->mem
disallowing offsets larger than 32k-12 due to rs6000_mode_dependent_address.
"m" is used for fpr->mem, so reload chooses a fpr.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/53914] poor code generated for offset addressing on ppc32
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
2012-07-10 13:33 ` [Bug target/53914] " amodra at gmail dot com
@ 2012-07-10 13:37 ` amodra at gmail dot com
2012-07-24 5:56 ` amodra at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: amodra at gmail dot com @ 2012-07-10 13:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-07-10
AssignedTo|unassigned at gcc dot |amodra at gmail dot com
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/53914] poor code generated for offset addressing on ppc32
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
2012-07-10 13:33 ` [Bug target/53914] " amodra at gmail dot com
2012-07-10 13:37 ` amodra at gmail dot com
@ 2012-07-24 5:56 ` amodra at gcc dot gnu.org
2012-07-24 6:11 ` amodra at gmail dot com
2012-07-24 6:16 ` amodra at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: amodra at gcc dot gnu.org @ 2012-07-24 5:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
--- Comment #2 from Alan Modra <amodra at gcc dot gnu.org> 2012-07-24 05:55:56 UTC ---
Author: amodra
Date: Tue Jul 24 05:55:50 2012
New Revision: 189801
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189801
Log:
PR target/53914
PR target/54009
* config/rs6000/constraints.md (Y): Use mem_operand_gpr.
* config/rs6000/predicates.md (word_offset_memref_operand): Delete.
Adjust all rs6000_legitimate_offset_address_p calls.
* config/rs6000/rs6000-protos.h (mem_operand_gpr): Declare.
(rs6000_secondary_reload_gpr): Declare.
(rs6000_legitimate_offset_address_p): Update prototype.
(rs6000_offsettable_memref_p): Delete.
(rs6000_secondary_reload_ppc64): Delete.
* config/rs6000/rs6000.c (address_offset): New function.
(mem_operand_gpr): Likewise.
(rs6000_legitimate_offset_address_p): Add worst_case param. When
not worst_case assume class of regs with least restrictive offsets.
Adjust all calls.
(legitimate_lo_sum_address_p): Simplify register mode tests.
(rs6000_legitimize_address): Likewise. Assume best case offset
addressing. Combine ELF and MACHO lo_sum code.
(rs6000_mode_dependent_address): Correct offset addressing limits.
(rs6000_offsettable_memref_p): Make static, add reg_mode param.
Use reg_mode to help rs6000_legitimate_offset_address_p.
(rs6000_secondary_reload): Use address_offset. Handle 32-bit multi
gpr load/store when offset too large.
(rs6000_secondary_reload_gpr): Renamed rs6000_secondary_reload_ppc64.
(rs6000_split_multireg_move): Adjust rs6000_offsettable_memref_p calls.
* config/rs6000/rs6000.md (movdf_hardfloat32): Use 'Y' constraint
for gpr load/store. Order alternatives as r->Y,Y->r,r->r and
d->m,m->d,d->d. Correct size of gpr load/store.
(movdf_softfloat32): Use 'Y' constraint for gpr load/store. Order
alternatives.
(movti_ppc64): Likewise.
(movdi_internal32): Likewise. Also disparage fprs.
(movdi_mfpgpr, movdi_internal64): Likewise.
(movtf_internal): Use 'm' for fpr load/store. Order alternatives.
(movtf_softfloat): Order alternatives.
(extenddftf2_internal): Use 'm' and 'Y' for store.
(movti_power, movti_string): Use 'Y' for gpr load/store. Order.
(stack_protect_setdi, stack_protect_testdi): Likewise.
(movdf_hardfloat64_mfpgpr, movdf_hardfloat64): Order alternatives.
(movdf_softfloat64): Likewise.
(reload_<mode>_store): Adjust reload_di_store to provide
reload_si_store as well.
(reload_<mode>_load): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/constraints.md
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000-protos.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/rs6000.md
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/53914] poor code generated for offset addressing on ppc32
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
` (2 preceding siblings ...)
2012-07-24 5:56 ` amodra at gcc dot gnu.org
@ 2012-07-24 6:11 ` amodra at gmail dot com
2012-07-24 6:16 ` amodra at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: amodra at gmail dot com @ 2012-07-24 6:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Alan Modra <amodra at gmail dot com> 2012-07-24 06:11:01 UTC ---
Fixed mainline
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/53914] poor code generated for offset addressing on ppc32
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
` (3 preceding siblings ...)
2012-07-24 6:11 ` amodra at gmail dot com
@ 2012-07-24 6:16 ` amodra at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: amodra at gmail dot com @ 2012-07-24 6:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53914
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-24 6:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 13:21 [Bug target/53914] New: poor code generated for offset addressing on ppc32 amodra at gmail dot com
2012-07-10 13:33 ` [Bug target/53914] " amodra at gmail dot com
2012-07-10 13:37 ` amodra at gmail dot com
2012-07-24 5:56 ` amodra at gcc dot gnu.org
2012-07-24 6:11 ` amodra at gmail dot com
2012-07-24 6:16 ` amodra at gmail dot com
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).