* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
@ 2009-10-12 21:51 ` rth at gcc dot gnu dot org
2009-10-15 8:19 ` carrot at google dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rth at gcc dot gnu dot org @ 2009-10-12 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rth at gcc dot gnu dot org 2009-10-12 21:51 -------
The expand pass relies on the rtx cost model to be correct.
I assume that arm_size_rtx_costs is models multiply incorrectly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
2009-10-12 21:51 ` [Bug target/41653] " rth at gcc dot gnu dot org
@ 2009-10-15 8:19 ` carrot at google dot com
2009-10-15 10:19 ` ramana at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: carrot at google dot com @ 2009-10-15 8:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from carrot at google dot com 2009-10-15 08:18 -------
arm_size_rtx_costs calls thumb1_rtx_costs for TARGET_THUMB1.
thumb1_rtx_costs is also called by several other functions. Looked at its
implementation briefly, it is actually tuned for speed only. Following are some
obvious example:
case UDIV:
case UMOD:
case DIV:
case MOD:
return 100;
case TRUNCATE:
return 99;
So a new function thumb1_size_rtx_costs is required to model the thumb1 size
feature, right?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
2009-10-12 21:51 ` [Bug target/41653] " rth at gcc dot gnu dot org
2009-10-15 8:19 ` carrot at google dot com
@ 2009-10-15 10:19 ` ramana at gcc dot gnu dot org
2009-12-07 8:59 ` carrot at google dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-15 10:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ramana at gcc dot gnu dot org 2009-10-15 10:19 -------
Confirmed.
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-15 10:19:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (2 preceding siblings ...)
2009-10-15 10:19 ` ramana at gcc dot gnu dot org
@ 2009-12-07 8:59 ` carrot at google dot com
2009-12-11 0:23 ` ramana at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: carrot at google dot com @ 2009-12-07 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from carrot at google dot com 2009-12-07 08:58 -------
Created an attachment (id=19247)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19247&action=view)
patch
The attached patch can fix this bug. But due to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42258, it can't bring any benefit
at now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (3 preceding siblings ...)
2009-12-07 8:59 ` carrot at google dot com
@ 2009-12-11 0:23 ` ramana at gcc dot gnu dot org
2009-12-11 0:25 ` ramana at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 0:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ramana at gcc dot gnu dot org 2009-12-11 00:22 -------
(In reply to comment #4)
> Created an attachment (id=19247)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19247&action=view) [edit]
> patch
>
> The attached patch can fix this bug. But due to
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42258, it can't bring any benefit
> at now.
>
Please submit patches to gcc-patches@gcc.gnu.org rather than attaching it to
the bug report.
Ramana
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (4 preceding siblings ...)
2009-12-11 0:23 ` ramana at gcc dot gnu dot org
@ 2009-12-11 0:25 ` ramana at gcc dot gnu dot org
2009-12-11 7:54 ` carrot at google dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ramana at gcc dot gnu dot org 2009-12-11 00:25 -------
(In reply to comment #5)
> Please submit patches to gcc-patches@gcc.gnu.org rather than attaching it to
> the bug report.
Also when doing so can you measure the impact of your patch with CSIBe and see
code size numbers ?
Thanks,
Ramana
>
> Ramana
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (5 preceding siblings ...)
2009-12-11 0:25 ` ramana at gcc dot gnu dot org
@ 2009-12-11 7:54 ` carrot at google dot com
2009-12-12 1:08 ` rearnsha at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: carrot at google dot com @ 2009-12-11 7:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from carrot at google dot com 2009-12-11 07:54 -------
(In reply to comment #6)
> (In reply to comment #5)
>
> > Please submit patches to gcc-patches@gcc.gnu.org rather than attaching it to
> > the bug report.
>
> Also when doing so can you measure the impact of your patch with CSIBe and see
> code size numbers ?
>
Because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42258, this patch can't
reduce instructions, actually it brings one more instruction. Only when that
regression has been fixed, this patch can then take effect. I will do
thoroughly testing and evaluation after that.
--
carrot at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |42258
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (6 preceding siblings ...)
2009-12-11 7:54 ` carrot at google dot com
@ 2009-12-12 1:08 ` rearnsha at gcc dot gnu dot org
2010-03-20 13:00 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-12-12 1:08 UTC (permalink / raw)
To: gcc-bugs
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (7 preceding siblings ...)
2009-12-12 1:08 ` rearnsha at gcc dot gnu dot org
@ 2010-03-20 13:00 ` steven at gcc dot gnu dot org
2010-04-08 9:28 ` carrot at gcc dot gnu dot org
2010-04-08 9:30 ` carrot at google dot com
10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-03-20 13:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from steven at gcc dot gnu dot org 2010-03-20 12:59 -------
Carrot, re. your comment #7: Time for that thoroughly testing.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (8 preceding siblings ...)
2010-03-20 13:00 ` steven at gcc dot gnu dot org
@ 2010-04-08 9:28 ` carrot at gcc dot gnu dot org
2010-04-08 9:30 ` carrot at google dot com
10 siblings, 0 replies; 12+ messages in thread
From: carrot at gcc dot gnu dot org @ 2010-04-08 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from carrot at gcc dot gnu dot org 2010-04-08 09:27 -------
Subject: Bug 41653
Author: carrot
Date: Thu Apr 8 09:27:44 2010
New Revision: 158110
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158110
Log:
PR target/41653
* config/arm/arm.c (thumb1_size_rtx_costs): New function.
(arm_size_rtx_costs): Call the new function when optimized for size.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/41653] not optimal result for multiplication with constant when -Os is specified
2009-10-10 9:20 [Bug target/41653] New: not optimal result for multiplication with constant when -Os is specified carrot at google dot com
` (9 preceding siblings ...)
2010-04-08 9:28 ` carrot at gcc dot gnu dot org
@ 2010-04-08 9:30 ` carrot at google dot com
10 siblings, 0 replies; 12+ messages in thread
From: carrot at google dot com @ 2010-04-08 9:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from carrot at google dot com 2010-04-08 09:29 -------
Fixed by the above patch.
--
carrot at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653
^ permalink raw reply [flat|nested] 12+ messages in thread