[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2010-04-08 Thread carrot at gcc dot gnu dot org


--- 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=gccview=revrev=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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2010-04-08 Thread carrot at google dot com


--- 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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2010-03-20 Thread steven at gcc dot gnu dot org


--- 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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-12-11 Thread rearnsha at gcc dot gnu dot org


-- 

rearnsha at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-12-10 Thread ramana at gcc dot gnu dot org


--- 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=19247action=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-patc...@gcc.gnu.org rather than attaching it to
the bug report. 

Ramana


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-12-10 Thread ramana at gcc dot gnu dot org


--- 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-patc...@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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-12-10 Thread carrot at google dot com


--- 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-patc...@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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-12-07 Thread carrot at google dot com


--- 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=19247action=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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-10-15 Thread carrot at google dot com


--- 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



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-10-15 Thread ramana at gcc dot gnu dot org


--- 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|-00-00 00:00:00 |2009-10-15 10:19:37
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41653



[Bug target/41653] not optimal result for multiplication with constant when -Os is specified

2009-10-12 Thread rth at gcc dot gnu dot org


--- 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