------- Comment #19 from steven at gcc dot gnu dot org  2010-02-05 14:58 -------
Interesting: for " -march=armv5te -mthumb" the code after IVOPTS is the perfect
code (from e.g. comment #17). The reason is that the address cost function for
Thumb (arm_thumb_address_cost) is of course not the same as that for ARM
(arm_arm_address_cost) so the correct code comes out automatically:

Address costs:
  index costs 1
  cst + index costs 1

In arm_arm_address_cost, "index" as a naked REG is the most expensive of all
addresses. In arm_thumb_address_cost it is the cheapest.

In conclusion: This is a target cost problem, not a generic rtl-optimization
bug. Adjusting as such. An ARM maintainer will have to figure out a better
implementation of arm_arm_address_cost.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|steven at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
          Component|rtl-optimization            |target


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

Reply via email to